~ubuntu-branches/ubuntu/saucy/starpu-contrib/saucy

« back to all changes in this revision

Viewing changes to configure

  • Committer: Package Import Robot
  • Author(s): Samuel Thibault
  • Date: 2012-04-12 15:04:15 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120412150415-gzp107thb5wknugm
Tags: 1.0.1-1
* New upstream release.
* Explicitly use gcc-4.6 to fix plugin build (Closes: Bug#667381).
* Use gcc-4.5 for starpu, as nvcc does not actually support all 4.6
  features, notably not __float128.
* patches/relax-gcc-plugin: Relax gcc-4.6 dependency for plugins to upstream
  release version (Closes: #670422)
* watch: Fix URL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
# Guess values for system-dependent variables and create Makefiles.
3
 
# Generated by GNU Autoconf 2.68 for StarPU 1.0.0.
 
3
# Generated by GNU Autoconf 2.69 for StarPU 1.0.1.
4
4
#
5
5
# Report bugs to <starpu-devel@lists.gforge.inria.fr>.
6
6
#
7
7
#
8
 
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9
 
# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
10
 
# Foundation, Inc.
 
8
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
11
9
#
12
10
#
13
11
# This configure script is free software; the Free Software Foundation
136
134
# CDPATH.
137
135
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
138
136
 
 
137
# Use a proper internal environment variable to ensure we don't fall
 
138
  # into an infinite loop, continuously re-executing ourselves.
 
139
  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
 
140
    _as_can_reexec=no; export _as_can_reexec;
 
141
    # We cannot yet assume a decent shell, so we have to provide a
 
142
# neutralization value for shells without unset; and this also
 
143
# works around shells that cannot unset nonexistent variables.
 
144
# Preserve -v and -x to the replacement shell.
 
145
BASH_ENV=/dev/null
 
146
ENV=/dev/null
 
147
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 
148
case $- in # ((((
 
149
  *v*x* | *x*v* ) as_opts=-vx ;;
 
150
  *v* ) as_opts=-v ;;
 
151
  *x* ) as_opts=-x ;;
 
152
  * ) as_opts= ;;
 
153
esac
 
154
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 
155
# Admittedly, this is quite paranoid, since all the known shells bail
 
156
# out after a failed `exec'.
 
157
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 
158
as_fn_exit 255
 
159
  fi
 
160
  # We don't want this to propagate to other subprocesses.
 
161
          { _as_can_reexec=; unset _as_can_reexec;}
139
162
if test "x$CONFIG_SHELL" = x; then
140
163
  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
141
164
  emulate sh
169
192
else
170
193
  exitcode=1; echo positional parameters were not saved.
171
194
fi
172
 
test x\$exitcode = x0 || exit 1"
 
195
test x\$exitcode = x0 || exit 1
 
196
test -x / || exit 1"
173
197
  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174
198
  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175
199
  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
222
246
 
223
247
 
224
248
      if test "x$CONFIG_SHELL" != x; then :
225
 
  # We cannot yet assume a decent shell, so we have to provide a
226
 
        # neutralization value for shells without unset; and this also
227
 
        # works around shells that cannot unset nonexistent variables.
228
 
        # Preserve -v and -x to the replacement shell.
229
 
        BASH_ENV=/dev/null
230
 
        ENV=/dev/null
231
 
        (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
232
 
        export CONFIG_SHELL
233
 
        case $- in # ((((
234
 
          *v*x* | *x*v* ) as_opts=-vx ;;
235
 
          *v* ) as_opts=-v ;;
236
 
          *x* ) as_opts=-x ;;
237
 
          * ) as_opts= ;;
238
 
        esac
239
 
        exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
 
249
  export CONFIG_SHELL
 
250
             # We cannot yet assume a decent shell, so we have to provide a
 
251
# neutralization value for shells without unset; and this also
 
252
# works around shells that cannot unset nonexistent variables.
 
253
# Preserve -v and -x to the replacement shell.
 
254
BASH_ENV=/dev/null
 
255
ENV=/dev/null
 
256
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
 
257
case $- in # ((((
 
258
  *v*x* | *x*v* ) as_opts=-vx ;;
 
259
  *v* ) as_opts=-v ;;
 
260
  *x* ) as_opts=-x ;;
 
261
  * ) as_opts= ;;
 
262
esac
 
263
exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
 
264
# Admittedly, this is quite paranoid, since all the known shells bail
 
265
# out after a failed `exec'.
 
266
$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
 
267
exit 255
240
268
fi
241
269
 
242
270
    if test x$as_have_required = xno; then :
339
367
 
340
368
 
341
369
} # as_fn_mkdir_p
 
370
 
 
371
# as_fn_executable_p FILE
 
372
# -----------------------
 
373
# Test if FILE is an executable regular file.
 
374
as_fn_executable_p ()
 
375
{
 
376
  test -f "$1" && test -x "$1"
 
377
} # as_fn_executable_p
342
378
# as_fn_append VAR VALUE
343
379
# ----------------------
344
380
# Append the text in VALUE to the end of the definition contained in VAR. Take
460
496
  chmod +x "$as_me.lineno" ||
461
497
    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
462
498
 
 
499
  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
 
500
  # already done that, so ensure we don't try to do so again and fall
 
501
  # in an infinite loop.  This has already happened in practice.
 
502
  _as_can_reexec=no; export _as_can_reexec
463
503
  # Don't try to exec as it changes $[0], causing all sort of problems
464
504
  # (the dirname of $[0] is not the place where we might find the
465
505
  # original and so on.  Autoconf is especially sensitive to this).
494
534
    # ... but there are two gotchas:
495
535
    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
496
536
    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
497
 
    # In both cases, we have to default to `cp -p'.
 
537
    # In both cases, we have to default to `cp -pR'.
498
538
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
499
 
      as_ln_s='cp -p'
 
539
      as_ln_s='cp -pR'
500
540
  elif ln conf$$.file conf$$ 2>/dev/null; then
501
541
    as_ln_s=ln
502
542
  else
503
 
    as_ln_s='cp -p'
 
543
    as_ln_s='cp -pR'
504
544
  fi
505
545
else
506
 
  as_ln_s='cp -p'
 
546
  as_ln_s='cp -pR'
507
547
fi
508
548
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
509
549
rmdir conf$$.dir 2>/dev/null
515
555
  as_mkdir_p=false
516
556
fi
517
557
 
518
 
if test -x / >/dev/null 2>&1; then
519
 
  as_test_x='test -x'
520
 
else
521
 
  if ls -dL / >/dev/null 2>&1; then
522
 
    as_ls_L_option=L
523
 
  else
524
 
    as_ls_L_option=
525
 
  fi
526
 
  as_test_x='
527
 
    eval sh -c '\''
528
 
      if test -d "$1"; then
529
 
        test -d "$1/.";
530
 
      else
531
 
        case $1 in #(
532
 
        -*)set "./$1";;
533
 
        esac;
534
 
        case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
535
 
        ???[sx]*):;;*)false;;esac;fi
536
 
    '\'' sh
537
 
  '
538
 
fi
539
 
as_executable_p=$as_test_x
 
558
as_test_x='test -x'
 
559
as_executable_p=as_fn_executable_p
540
560
 
541
561
# Sed expression to map a string onto a valid CPP name.
542
562
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
570
590
# Identity of this package.
571
591
PACKAGE_NAME='StarPU'
572
592
PACKAGE_TARNAME='starpu'
573
 
PACKAGE_VERSION='1.0.0'
574
 
PACKAGE_STRING='StarPU 1.0.0'
 
593
PACKAGE_VERSION='1.0.1'
 
594
PACKAGE_STRING='StarPU 1.0.1'
575
595
PACKAGE_BUGREPORT='starpu-devel@lists.gforge.inria.fr'
576
596
PACKAGE_URL=''
577
597
 
674
694
STARPU_USE_SOCL_TRUE
675
695
BUILD_SOCL_FALSE
676
696
BUILD_SOCL_TRUE
677
 
HAVE_GUILE_FALSE
678
 
HAVE_GUILE_TRUE
 
697
RUN_GCC_PLUGIN_TESTS_FALSE
 
698
RUN_GCC_PLUGIN_TESTS_TRUE
679
699
BUILD_GCC_PLUGIN_FALSE
680
700
BUILD_GCC_PLUGIN_TRUE
681
701
YACC
1454
1474
if test "x$host_alias" != x; then
1455
1475
  if test "x$build_alias" = x; then
1456
1476
    cross_compiling=maybe
1457
 
    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1458
 
    If a cross compiler is detected then cross compile mode will be used" >&2
1459
1477
  elif test "x$build_alias" != "x$host_alias"; then
1460
1478
    cross_compiling=yes
1461
1479
  fi
1541
1559
  # Omit some internal or obsolete options to make the list less imposing.
1542
1560
  # This message is too long to be a string in the A/UX 3.1 sh.
1543
1561
  cat <<_ACEOF
1544
 
\`configure' configures StarPU 1.0.0 to adapt to many kinds of systems.
 
1562
\`configure' configures StarPU 1.0.1 to adapt to many kinds of systems.
1545
1563
 
1546
1564
Usage: $0 [OPTION]... [VAR=VALUE]...
1547
1565
 
1616
1634
 
1617
1635
if test -n "$ac_init_help"; then
1618
1636
  case $ac_init_help in
1619
 
     short | recursive ) echo "Configuration of StarPU 1.0.0:";;
 
1637
     short | recursive ) echo "Configuration of StarPU 1.0.1:";;
1620
1638
   esac
1621
1639
  cat <<\_ACEOF
1622
1640
 
1824
1842
test -n "$ac_init_help" && exit $ac_status
1825
1843
if $ac_init_version; then
1826
1844
  cat <<\_ACEOF
1827
 
StarPU configure 1.0.0
1828
 
generated by GNU Autoconf 2.68
 
1845
StarPU configure 1.0.1
 
1846
generated by GNU Autoconf 2.69
1829
1847
 
1830
 
Copyright (C) 2010 Free Software Foundation, Inc.
 
1848
Copyright (C) 2012 Free Software Foundation, Inc.
1831
1849
This configure script is free software; the Free Software Foundation
1832
1850
gives unlimited permission to copy, distribute and modify it.
1833
1851
_ACEOF
2016
2034
         test ! -s conftest.err
2017
2035
       } && test -s conftest$ac_exeext && {
2018
2036
         test "$cross_compiling" = yes ||
2019
 
         $as_test_x conftest$ac_exeext
 
2037
         test -x conftest$ac_exeext
2020
2038
       }; then :
2021
2039
  ac_retval=0
2022
2040
else
2239
2257
         test ! -s conftest.err
2240
2258
       } && test -s conftest$ac_exeext && {
2241
2259
         test "$cross_compiling" = yes ||
2242
 
         $as_test_x conftest$ac_exeext
 
2260
         test -x conftest$ac_exeext
2243
2261
       }; then :
2244
2262
  ac_retval=0
2245
2263
else
2285
2303
         test ! -s conftest.err
2286
2304
       } && test -s conftest$ac_exeext && {
2287
2305
         test "$cross_compiling" = yes ||
2288
 
         $as_test_x conftest$ac_exeext
 
2306
         test -x conftest$ac_exeext
2289
2307
       }; then :
2290
2308
  ac_retval=0
2291
2309
else
2321
2339
main ()
2322
2340
{
2323
2341
static int test_array [1 - 2 * !(($2) >= 0)];
2324
 
test_array [0] = 0
 
2342
test_array [0] = 0;
 
2343
return test_array [0];
2325
2344
 
2326
2345
  ;
2327
2346
  return 0;
2337
2356
main ()
2338
2357
{
2339
2358
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2340
 
test_array [0] = 0
 
2359
test_array [0] = 0;
 
2360
return test_array [0];
2341
2361
 
2342
2362
  ;
2343
2363
  return 0;
2363
2383
main ()
2364
2384
{
2365
2385
static int test_array [1 - 2 * !(($2) < 0)];
2366
 
test_array [0] = 0
 
2386
test_array [0] = 0;
 
2387
return test_array [0];
2367
2388
 
2368
2389
  ;
2369
2390
  return 0;
2379
2400
main ()
2380
2401
{
2381
2402
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2382
 
test_array [0] = 0
 
2403
test_array [0] = 0;
 
2404
return test_array [0];
2383
2405
 
2384
2406
  ;
2385
2407
  return 0;
2413
2435
main ()
2414
2436
{
2415
2437
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2416
 
test_array [0] = 0
 
2438
test_array [0] = 0;
 
2439
return test_array [0];
2417
2440
 
2418
2441
  ;
2419
2442
  return 0;
2733
2756
This file contains any messages produced by compilers while
2734
2757
running configure, to aid debugging if configure makes a mistake.
2735
2758
 
2736
 
It was created by StarPU $as_me 1.0.0, which was
2737
 
generated by GNU Autoconf 2.68.  Invocation command line was
 
2759
It was created by StarPU $as_me 1.0.1, which was
 
2760
generated by GNU Autoconf 2.69.  Invocation command line was
2738
2761
 
2739
2762
  $ $0 $@
2740
2763
 
3294
3317
    # by default.
3295
3318
    for ac_prog in ginstall scoinst install; do
3296
3319
      for ac_exec_ext in '' $ac_executable_extensions; do
3297
 
        if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
 
3320
        if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3298
3321
          if test $ac_prog = install &&
3299
3322
            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3300
3323
            # AIX install.  It has an incompatible calling convention.
3463
3486
  IFS=$as_save_IFS
3464
3487
  test -z "$as_dir" && as_dir=.
3465
3488
    for ac_exec_ext in '' $ac_executable_extensions; do
3466
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
3489
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3467
3490
    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3468
3491
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3469
3492
    break 2
3503
3526
  IFS=$as_save_IFS
3504
3527
  test -z "$as_dir" && as_dir=.
3505
3528
    for ac_exec_ext in '' $ac_executable_extensions; do
3506
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
3529
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3507
3530
    ac_cv_prog_ac_ct_STRIP="strip"
3508
3531
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3509
3532
    break 2
3554
3577
  test -z "$as_dir" && as_dir=.
3555
3578
    for ac_prog in mkdir gmkdir; do
3556
3579
         for ac_exec_ext in '' $ac_executable_extensions; do
3557
 
           { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
 
3580
           as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3558
3581
           case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3559
3582
             'mkdir (GNU coreutils) '* | \
3560
3583
             'mkdir (coreutils) '* | \
3607
3630
  IFS=$as_save_IFS
3608
3631
  test -z "$as_dir" && as_dir=.
3609
3632
    for ac_exec_ext in '' $ac_executable_extensions; do
3610
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
3633
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3611
3634
    ac_cv_prog_AWK="$ac_prog"
3612
3635
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3613
3636
    break 2
3732
3755
 
3733
3756
# Define the identity of the package.
3734
3757
 PACKAGE='starpu'
3735
 
 VERSION='1.0.0'
 
3758
 VERSION='1.0.1'
3736
3759
 
3737
3760
 
3738
3761
cat >>confdefs.h <<_ACEOF
3837
3860
  IFS=$as_save_IFS
3838
3861
  test -z "$as_dir" && as_dir=.
3839
3862
    for ac_exec_ext in '' $ac_executable_extensions; do
3840
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
3863
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3841
3864
    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3842
3865
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3843
3866
    break 2
3877
3900
  IFS=$as_save_IFS
3878
3901
  test -z "$as_dir" && as_dir=.
3879
3902
    for ac_exec_ext in '' $ac_executable_extensions; do
3880
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
3903
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3881
3904
    ac_cv_prog_ac_ct_CC="gcc"
3882
3905
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3883
3906
    break 2
3930
3953
  IFS=$as_save_IFS
3931
3954
  test -z "$as_dir" && as_dir=.
3932
3955
    for ac_exec_ext in '' $ac_executable_extensions; do
3933
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
3956
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3934
3957
    ac_cv_prog_CC="${ac_tool_prefix}cc"
3935
3958
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3936
3959
    break 2
3971
3994
  IFS=$as_save_IFS
3972
3995
  test -z "$as_dir" && as_dir=.
3973
3996
    for ac_exec_ext in '' $ac_executable_extensions; do
3974
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
3997
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3975
3998
    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3976
3999
       ac_prog_rejected=yes
3977
4000
       continue
4029
4052
  IFS=$as_save_IFS
4030
4053
  test -z "$as_dir" && as_dir=.
4031
4054
    for ac_exec_ext in '' $ac_executable_extensions; do
4032
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
4055
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4033
4056
    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4034
4057
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4035
4058
    break 2
4073
4096
  IFS=$as_save_IFS
4074
4097
  test -z "$as_dir" && as_dir=.
4075
4098
    for ac_exec_ext in '' $ac_executable_extensions; do
4076
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
4099
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4077
4100
    ac_cv_prog_ac_ct_CC="$ac_prog"
4078
4101
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4079
4102
    break 2
4519
4542
/* end confdefs.h.  */
4520
4543
#include <stdarg.h>
4521
4544
#include <stdio.h>
4522
 
#include <sys/types.h>
4523
 
#include <sys/stat.h>
 
4545
struct stat;
4524
4546
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
4525
4547
struct buf { int x; };
4526
4548
FILE * (*rcsopen) (struct buf *, struct stat *, int);
4824
4846
  IFS=$as_save_IFS
4825
4847
  test -z "$as_dir" && as_dir=.
4826
4848
    for ac_exec_ext in '' $ac_executable_extensions; do
4827
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
4849
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4828
4850
    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4829
4851
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4830
4852
    break 2
4868
4890
  IFS=$as_save_IFS
4869
4891
  test -z "$as_dir" && as_dir=.
4870
4892
    for ac_exec_ext in '' $ac_executable_extensions; do
4871
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
4893
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4872
4894
    ac_cv_prog_ac_ct_CXX="$ac_prog"
4873
4895
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4874
4896
    break 2
5340
5362
    for ac_prog in sed gsed; do
5341
5363
    for ac_exec_ext in '' $ac_executable_extensions; do
5342
5364
      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
5343
 
      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
 
5365
      as_fn_executable_p "$ac_path_SED" || continue
5344
5366
# Check for GNU ac_path_SED and select it if it is found.
5345
5367
  # Check for GNU $ac_path_SED
5346
5368
case `"$ac_path_SED" --version 2>&1` in
5403
5425
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5404
5426
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
5405
5427
if test -n "$ac_tool_prefix"; then
5406
 
  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn
 
5428
  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
5407
5429
  do
5408
5430
    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5409
5431
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5421
5443
  IFS=$as_save_IFS
5422
5444
  test -z "$as_dir" && as_dir=.
5423
5445
    for ac_exec_ext in '' $ac_executable_extensions; do
5424
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
5446
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5425
5447
    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
5426
5448
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5427
5449
    break 2
5447
5469
fi
5448
5470
if test -z "$F77"; then
5449
5471
  ac_ct_F77=$F77
5450
 
  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn
 
5472
  for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgfortran pgf95 lf95 ftn nagfor
5451
5473
do
5452
5474
  # Extract the first word of "$ac_prog", so it can be a program name with args.
5453
5475
set dummy $ac_prog; ac_word=$2
5465
5487
  IFS=$as_save_IFS
5466
5488
  test -z "$as_dir" && as_dir=.
5467
5489
    for ac_exec_ext in '' $ac_executable_extensions; do
5468
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
5490
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5469
5491
    ac_cv_prog_ac_ct_F77="$ac_prog"
5470
5492
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5471
5493
    break 2
5727
5749
    for ac_prog in sed gsed; do
5728
5750
    for ac_exec_ext in '' $ac_executable_extensions; do
5729
5751
      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
5730
 
      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
 
5752
      as_fn_executable_p "$ac_path_SED" || continue
5731
5753
# Check for GNU ac_path_SED and select it if it is found.
5732
5754
  # Check for GNU $ac_path_SED
5733
5755
case `"$ac_path_SED" --version 2>&1` in
5803
5825
    for ac_prog in grep ggrep; do
5804
5826
    for ac_exec_ext in '' $ac_executable_extensions; do
5805
5827
      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5806
 
      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
 
5828
      as_fn_executable_p "$ac_path_GREP" || continue
5807
5829
# Check for GNU ac_path_GREP and select it if it is found.
5808
5830
  # Check for GNU $ac_path_GREP
5809
5831
case `"$ac_path_GREP" --version 2>&1` in
5869
5891
    for ac_prog in egrep; do
5870
5892
    for ac_exec_ext in '' $ac_executable_extensions; do
5871
5893
      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5872
 
      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
 
5894
      as_fn_executable_p "$ac_path_EGREP" || continue
5873
5895
# Check for GNU ac_path_EGREP and select it if it is found.
5874
5896
  # Check for GNU $ac_path_EGREP
5875
5897
case `"$ac_path_EGREP" --version 2>&1` in
5936
5958
    for ac_prog in fgrep; do
5937
5959
    for ac_exec_ext in '' $ac_executable_extensions; do
5938
5960
      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
5939
 
      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
 
5961
      as_fn_executable_p "$ac_path_FGREP" || continue
5940
5962
# Check for GNU ac_path_FGREP and select it if it is found.
5941
5963
  # Check for GNU $ac_path_FGREP
5942
5964
case `"$ac_path_FGREP" --version 2>&1` in
6192
6214
  IFS=$as_save_IFS
6193
6215
  test -z "$as_dir" && as_dir=.
6194
6216
    for ac_exec_ext in '' $ac_executable_extensions; do
6195
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
6217
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6196
6218
    ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
6197
6219
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6198
6220
    break 2
6236
6258
  IFS=$as_save_IFS
6237
6259
  test -z "$as_dir" && as_dir=.
6238
6260
    for ac_exec_ext in '' $ac_executable_extensions; do
6239
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
6261
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6240
6262
    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
6241
6263
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6242
6264
    break 2
6649
6671
  IFS=$as_save_IFS
6650
6672
  test -z "$as_dir" && as_dir=.
6651
6673
    for ac_exec_ext in '' $ac_executable_extensions; do
6652
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
6674
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6653
6675
    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
6654
6676
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6655
6677
    break 2
6689
6711
  IFS=$as_save_IFS
6690
6712
  test -z "$as_dir" && as_dir=.
6691
6713
    for ac_exec_ext in '' $ac_executable_extensions; do
6692
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
6714
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6693
6715
    ac_cv_prog_ac_ct_OBJDUMP="objdump"
6694
6716
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6695
6717
    break 2
6992
7014
  IFS=$as_save_IFS
6993
7015
  test -z "$as_dir" && as_dir=.
6994
7016
    for ac_exec_ext in '' $ac_executable_extensions; do
6995
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
7017
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6996
7018
    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
6997
7019
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6998
7020
    break 2
7032
7054
  IFS=$as_save_IFS
7033
7055
  test -z "$as_dir" && as_dir=.
7034
7056
    for ac_exec_ext in '' $ac_executable_extensions; do
7035
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
7057
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7036
7058
    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7037
7059
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7038
7060
    break 2
7133
7155
  IFS=$as_save_IFS
7134
7156
  test -z "$as_dir" && as_dir=.
7135
7157
    for ac_exec_ext in '' $ac_executable_extensions; do
7136
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
7158
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7137
7159
    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
7138
7160
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7139
7161
    break 2
7177
7199
  IFS=$as_save_IFS
7178
7200
  test -z "$as_dir" && as_dir=.
7179
7201
    for ac_exec_ext in '' $ac_executable_extensions; do
7180
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
7202
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7181
7203
    ac_cv_prog_ac_ct_AR="$ac_prog"
7182
7204
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7183
7205
    break 2
7302
7324
  IFS=$as_save_IFS
7303
7325
  test -z "$as_dir" && as_dir=.
7304
7326
    for ac_exec_ext in '' $ac_executable_extensions; do
7305
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
7327
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7306
7328
    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
7307
7329
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7308
7330
    break 2
7342
7364
  IFS=$as_save_IFS
7343
7365
  test -z "$as_dir" && as_dir=.
7344
7366
    for ac_exec_ext in '' $ac_executable_extensions; do
7345
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
7367
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7346
7368
    ac_cv_prog_ac_ct_STRIP="strip"
7347
7369
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7348
7370
    break 2
7401
7423
  IFS=$as_save_IFS
7402
7424
  test -z "$as_dir" && as_dir=.
7403
7425
    for ac_exec_ext in '' $ac_executable_extensions; do
7404
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
7426
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7405
7427
    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7406
7428
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7407
7429
    break 2
7441
7463
  IFS=$as_save_IFS
7442
7464
  test -z "$as_dir" && as_dir=.
7443
7465
    for ac_exec_ext in '' $ac_executable_extensions; do
7444
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
7466
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7445
7467
    ac_cv_prog_ac_ct_RANLIB="ranlib"
7446
7468
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7447
7469
    break 2
8090
8112
  IFS=$as_save_IFS
8091
8113
  test -z "$as_dir" && as_dir=.
8092
8114
    for ac_exec_ext in '' $ac_executable_extensions; do
8093
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
8115
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8094
8116
    ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
8095
8117
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8096
8118
    break 2
8130
8152
  IFS=$as_save_IFS
8131
8153
  test -z "$as_dir" && as_dir=.
8132
8154
    for ac_exec_ext in '' $ac_executable_extensions; do
8133
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
8155
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8134
8156
    ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
8135
8157
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8136
8158
    break 2
8210
8232
  IFS=$as_save_IFS
8211
8233
  test -z "$as_dir" && as_dir=.
8212
8234
    for ac_exec_ext in '' $ac_executable_extensions; do
8213
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
8235
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8214
8236
    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
8215
8237
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8216
8238
    break 2
8250
8272
  IFS=$as_save_IFS
8251
8273
  test -z "$as_dir" && as_dir=.
8252
8274
    for ac_exec_ext in '' $ac_executable_extensions; do
8253
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
8275
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8254
8276
    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
8255
8277
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8256
8278
    break 2
8302
8324
  IFS=$as_save_IFS
8303
8325
  test -z "$as_dir" && as_dir=.
8304
8326
    for ac_exec_ext in '' $ac_executable_extensions; do
8305
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
8327
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8306
8328
    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
8307
8329
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8308
8330
    break 2
8342
8364
  IFS=$as_save_IFS
8343
8365
  test -z "$as_dir" && as_dir=.
8344
8366
    for ac_exec_ext in '' $ac_executable_extensions; do
8345
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
8367
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8346
8368
    ac_cv_prog_ac_ct_NMEDIT="nmedit"
8347
8369
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8348
8370
    break 2
8394
8416
  IFS=$as_save_IFS
8395
8417
  test -z "$as_dir" && as_dir=.
8396
8418
    for ac_exec_ext in '' $ac_executable_extensions; do
8397
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
8419
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8398
8420
    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
8399
8421
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8400
8422
    break 2
8434
8456
  IFS=$as_save_IFS
8435
8457
  test -z "$as_dir" && as_dir=.
8436
8458
    for ac_exec_ext in '' $ac_executable_extensions; do
8437
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
8459
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8438
8460
    ac_cv_prog_ac_ct_LIPO="lipo"
8439
8461
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8440
8462
    break 2
8486
8508
  IFS=$as_save_IFS
8487
8509
  test -z "$as_dir" && as_dir=.
8488
8510
    for ac_exec_ext in '' $ac_executable_extensions; do
8489
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
8511
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8490
8512
    ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
8491
8513
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8492
8514
    break 2
8526
8548
  IFS=$as_save_IFS
8527
8549
  test -z "$as_dir" && as_dir=.
8528
8550
    for ac_exec_ext in '' $ac_executable_extensions; do
8529
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
8551
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8530
8552
    ac_cv_prog_ac_ct_OTOOL="otool"
8531
8553
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8532
8554
    break 2
8578
8600
  IFS=$as_save_IFS
8579
8601
  test -z "$as_dir" && as_dir=.
8580
8602
    for ac_exec_ext in '' $ac_executable_extensions; do
8581
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
8603
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8582
8604
    ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
8583
8605
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8584
8606
    break 2
8618
8640
  IFS=$as_save_IFS
8619
8641
  test -z "$as_dir" && as_dir=.
8620
8642
    for ac_exec_ext in '' $ac_executable_extensions; do
8621
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
8643
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8622
8644
    ac_cv_prog_ac_ct_OTOOL64="otool64"
8623
8645
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8624
8646
    break 2
8998
9020
  IFS=$as_save_IFS
8999
9021
  test -z "$as_dir" && as_dir=.
9000
9022
    for ac_exec_ext in '' $ac_executable_extensions; do
9001
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
9023
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9002
9024
    ac_cv_prog_AS="${ac_tool_prefix}as"
9003
9025
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9004
9026
    break 2
9038
9060
  IFS=$as_save_IFS
9039
9061
  test -z "$as_dir" && as_dir=.
9040
9062
    for ac_exec_ext in '' $ac_executable_extensions; do
9041
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
9063
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9042
9064
    ac_cv_prog_ac_ct_AS="as"
9043
9065
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9044
9066
    break 2
9090
9112
  IFS=$as_save_IFS
9091
9113
  test -z "$as_dir" && as_dir=.
9092
9114
    for ac_exec_ext in '' $ac_executable_extensions; do
9093
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
9115
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9094
9116
    ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
9095
9117
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9096
9118
    break 2
9130
9152
  IFS=$as_save_IFS
9131
9153
  test -z "$as_dir" && as_dir=.
9132
9154
    for ac_exec_ext in '' $ac_executable_extensions; do
9133
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
9155
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9134
9156
    ac_cv_prog_ac_ct_DLLTOOL="dlltool"
9135
9157
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9136
9158
    break 2
9182
9204
  IFS=$as_save_IFS
9183
9205
  test -z "$as_dir" && as_dir=.
9184
9206
    for ac_exec_ext in '' $ac_executable_extensions; do
9185
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
9207
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9186
9208
    ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
9187
9209
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9188
9210
    break 2
9222
9244
  IFS=$as_save_IFS
9223
9245
  test -z "$as_dir" && as_dir=.
9224
9246
    for ac_exec_ext in '' $ac_executable_extensions; do
9225
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
9247
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9226
9248
    ac_cv_prog_ac_ct_OBJDUMP="objdump"
9227
9249
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9228
9250
    break 2
19425
19447
  IFS=$as_save_IFS
19426
19448
  test -z "$as_dir" && as_dir=.
19427
19449
    for ac_exec_ext in '' $ac_executable_extensions; do
19428
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
19450
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19429
19451
    ac_cv_path_STARPU_MS_LIB="$as_dir/$ac_word$ac_exec_ext"
19430
19452
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19431
19453
    break 2
20313
20335
 
20314
20336
 
20315
20337
 
20316
 
 
20317
20338
if test x$enable_cuda = xyes -o x$enable_cuda = xmaybe; then
20318
20339
 
20319
 
    __cuda_dir=$cuda_dir
20320
 
    __cuda_lib_dir=$cuda_lib_dir
20321
 
 
20322
 
    if test "$__cuda_dir" != "no" ; then
20323
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available in $__cuda_dir" >&5
20324
 
$as_echo_n "checking whether CUDA is available in $__cuda_dir... " >&6; }
20325
 
    else
20326
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available" >&5
20327
 
$as_echo_n "checking whether CUDA is available... " >&6; }
20328
 
    fi
20329
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
20330
 
$as_echo "" >&6; }
20331
 
 
20332
 
    if test "$__cuda_lib_dir" = "no" -a "$__cuda_dir" != "no" ; then
20333
 
        __cuda_lib_dir="$__cuda_dir/lib"
20334
 
    fi
20335
 
 
20336
 
    SAVED_LDFLAGS="${LDFLAGS}"
20337
 
 
20338
 
    if test "$__cuda_dir" != "no" ; then
20339
 
        STARPU_CUDA_LDFLAGS="-L${__cuda_lib_dir}"
20340
 
        LDFLAGS="${SAVED_LDFLAGS} -L${__cuda_lib_dir}"
20341
 
    fi
20342
 
 
20343
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcuda" >&5
20344
 
$as_echo_n "checking for main in -lcuda... " >&6; }
20345
 
if ${ac_cv_lib_cuda_main+:} false; then :
20346
 
  $as_echo_n "(cached) " >&6
20347
 
else
20348
 
  ac_check_lib_save_LIBS=$LIBS
20349
 
LIBS="-lcuda  $LIBS"
20350
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20351
 
/* end confdefs.h.  */
20352
 
 
20353
 
 
20354
 
int
20355
 
main ()
20356
 
{
20357
 
return main ();
20358
 
  ;
20359
 
  return 0;
20360
 
}
20361
 
_ACEOF
20362
 
if ac_fn_c_try_link "$LINENO"; then :
20363
 
  ac_cv_lib_cuda_main=yes
20364
 
else
20365
 
  ac_cv_lib_cuda_main=no
20366
 
fi
20367
 
rm -f core conftest.err conftest.$ac_objext \
20368
 
    conftest$ac_exeext conftest.$ac_ext
20369
 
LIBS=$ac_check_lib_save_LIBS
20370
 
fi
20371
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cuda_main" >&5
20372
 
$as_echo "$ac_cv_lib_cuda_main" >&6; }
20373
 
if test "x$ac_cv_lib_cuda_main" = xyes; then :
20374
 
  have_valid_cuda=yes
20375
 
else
20376
 
  have_valid_cuda=no
20377
 
fi
20378
 
ac_cv_lib_cuda=ac_cv_lib_cuda_main
20379
 
 
20380
 
    unset ac_cv_lib_cuda_main
20381
 
 
20382
 
    if test "$have_valid_cuda" = "no" ; then
20383
 
        if test "$__cuda_dir" != "no" ; then
20384
 
            STARPU_CUDA_LDFLAGS="-L${__cuda_dir}/lib64"
20385
 
            LDFLAGS="${SAVED_LDFLAGS} -L${__cuda_dir}/lib64"
20386
 
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcuda" >&5
20387
 
$as_echo_n "checking for main in -lcuda... " >&6; }
20388
 
if ${ac_cv_lib_cuda_main+:} false; then :
20389
 
  $as_echo_n "(cached) " >&6
20390
 
else
20391
 
  ac_check_lib_save_LIBS=$LIBS
20392
 
LIBS="-lcuda  $LIBS"
20393
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20394
 
/* end confdefs.h.  */
20395
 
 
20396
 
 
20397
 
int
20398
 
main ()
20399
 
{
20400
 
return main ();
20401
 
  ;
20402
 
  return 0;
20403
 
}
20404
 
_ACEOF
20405
 
if ac_fn_c_try_link "$LINENO"; then :
20406
 
  ac_cv_lib_cuda_main=yes
20407
 
else
20408
 
  ac_cv_lib_cuda_main=no
20409
 
fi
20410
 
rm -f core conftest.err conftest.$ac_objext \
20411
 
    conftest$ac_exeext conftest.$ac_ext
20412
 
LIBS=$ac_check_lib_save_LIBS
20413
 
fi
20414
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cuda_main" >&5
20415
 
$as_echo "$ac_cv_lib_cuda_main" >&6; }
20416
 
if test "x$ac_cv_lib_cuda_main" = xyes; then :
20417
 
  have_valid_cuda=yes
20418
 
else
20419
 
  have_valid_cuda=no
20420
 
fi
20421
 
ac_cv_lib_cuda=ac_cv_lib_cuda_main
20422
 
 
20423
 
            unset ac_cv_lib_cuda_main
20424
 
        fi
20425
 
    fi
20426
 
 
20427
 
    if test "$have_valid_cuda" = "no" ; then
20428
 
        LDFLAGS="${SAVED_LDFLAGS}"
20429
 
        unset STARPU_CUDA_LDFLAGS
20430
 
    fi
20431
 
 
20432
 
    if test "$have_valid_cuda" = "no" ; then
20433
 
        for f in "/usr/local/cuda" "/c/cuda" "/cygdrive/c/cuda" "/opt/cuda" "$CUDA_INC_PATH/.." "$CUDA_INSTALL_PATH" "$CUDA_TOOLKIT"; do
20434
 
 
20435
 
    __cuda_dir=$f
20436
 
    __cuda_lib_dir="no"
20437
 
 
20438
 
    if test "$__cuda_dir" != "no" ; then
20439
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available in $__cuda_dir" >&5
20440
 
$as_echo_n "checking whether CUDA is available in $__cuda_dir... " >&6; }
20441
 
    else
20442
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available" >&5
20443
 
$as_echo_n "checking whether CUDA is available... " >&6; }
20444
 
    fi
20445
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
20446
 
$as_echo "" >&6; }
20447
 
 
20448
 
    if test "$__cuda_lib_dir" = "no" -a "$__cuda_dir" != "no" ; then
20449
 
        __cuda_lib_dir="$__cuda_dir/lib"
20450
 
    fi
20451
 
 
20452
 
    SAVED_LDFLAGS="${LDFLAGS}"
20453
 
 
20454
 
    if test "$__cuda_dir" != "no" ; then
20455
 
        STARPU_CUDA_LDFLAGS="-L${__cuda_lib_dir}"
20456
 
        LDFLAGS="${SAVED_LDFLAGS} -L${__cuda_lib_dir}"
20457
 
    fi
20458
 
 
20459
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcuda" >&5
20460
 
$as_echo_n "checking for main in -lcuda... " >&6; }
20461
 
if ${ac_cv_lib_cuda_main+:} false; then :
20462
 
  $as_echo_n "(cached) " >&6
20463
 
else
20464
 
  ac_check_lib_save_LIBS=$LIBS
20465
 
LIBS="-lcuda  $LIBS"
20466
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20467
 
/* end confdefs.h.  */
20468
 
 
20469
 
 
20470
 
int
20471
 
main ()
20472
 
{
20473
 
return main ();
20474
 
  ;
20475
 
  return 0;
20476
 
}
20477
 
_ACEOF
20478
 
if ac_fn_c_try_link "$LINENO"; then :
20479
 
  ac_cv_lib_cuda_main=yes
20480
 
else
20481
 
  ac_cv_lib_cuda_main=no
20482
 
fi
20483
 
rm -f core conftest.err conftest.$ac_objext \
20484
 
    conftest$ac_exeext conftest.$ac_ext
20485
 
LIBS=$ac_check_lib_save_LIBS
20486
 
fi
20487
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cuda_main" >&5
20488
 
$as_echo "$ac_cv_lib_cuda_main" >&6; }
20489
 
if test "x$ac_cv_lib_cuda_main" = xyes; then :
20490
 
  have_valid_cuda=yes
20491
 
else
20492
 
  have_valid_cuda=no
20493
 
fi
20494
 
ac_cv_lib_cuda=ac_cv_lib_cuda_main
20495
 
 
20496
 
    unset ac_cv_lib_cuda_main
20497
 
 
20498
 
    if test "$have_valid_cuda" = "no" ; then
20499
 
        if test "$__cuda_dir" != "no" ; then
20500
 
            STARPU_CUDA_LDFLAGS="-L${__cuda_dir}/lib64"
20501
 
            LDFLAGS="${SAVED_LDFLAGS} -L${__cuda_dir}/lib64"
20502
 
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcuda" >&5
20503
 
$as_echo_n "checking for main in -lcuda... " >&6; }
20504
 
if ${ac_cv_lib_cuda_main+:} false; then :
20505
 
  $as_echo_n "(cached) " >&6
20506
 
else
20507
 
  ac_check_lib_save_LIBS=$LIBS
20508
 
LIBS="-lcuda  $LIBS"
20509
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20510
 
/* end confdefs.h.  */
20511
 
 
20512
 
 
20513
 
int
20514
 
main ()
20515
 
{
20516
 
return main ();
20517
 
  ;
20518
 
  return 0;
20519
 
}
20520
 
_ACEOF
20521
 
if ac_fn_c_try_link "$LINENO"; then :
20522
 
  ac_cv_lib_cuda_main=yes
20523
 
else
20524
 
  ac_cv_lib_cuda_main=no
20525
 
fi
20526
 
rm -f core conftest.err conftest.$ac_objext \
20527
 
    conftest$ac_exeext conftest.$ac_ext
20528
 
LIBS=$ac_check_lib_save_LIBS
20529
 
fi
20530
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cuda_main" >&5
20531
 
$as_echo "$ac_cv_lib_cuda_main" >&6; }
20532
 
if test "x$ac_cv_lib_cuda_main" = xyes; then :
20533
 
  have_valid_cuda=yes
20534
 
else
20535
 
  have_valid_cuda=no
20536
 
fi
20537
 
ac_cv_lib_cuda=ac_cv_lib_cuda_main
20538
 
 
20539
 
            unset ac_cv_lib_cuda_main
20540
 
        fi
20541
 
    fi
20542
 
 
20543
 
    if test "$have_valid_cuda" = "no" ; then
20544
 
        LDFLAGS="${SAVED_LDFLAGS}"
20545
 
        unset STARPU_CUDA_LDFLAGS
20546
 
    fi
20547
 
 
20548
 
            if test "$have_valid_cuda" = "yes" ; then
20549
 
                break
20550
 
            fi
20551
 
        done
20552
 
    fi
20553
 
 
20554
 
    if test "$have_valid_cuda" = "yes" ; then
20555
 
 
20556
 
    __cuda_dir=$cuda_dir
20557
 
    __cuda_include_dir=$cuda_include_dir
20558
 
    __cuda_lib_dir=$cuda_lib_dir
20559
 
 
20560
 
    if test "$__cuda_dir" != "no" -a "$__cuda_dir" != "" ; then
20561
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA RT is available in $__cuda_dir" >&5
20562
 
$as_echo_n "checking whether CUDA RT is available in $__cuda_dir... " >&6; }
20563
 
    else
20564
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA RT is available" >&5
20565
 
$as_echo_n "checking whether CUDA RT is available... " >&6; }
20566
 
    fi
20567
 
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
20568
 
$as_echo "" >&6; }
20569
 
 
20570
 
    if test "$__cuda_include_dir" = "no" -a "$__cuda_dir" != "no" ; then
20571
 
        __cuda_include_dir="$__cuda_dir/include"
20572
 
    fi
20573
 
    if test "$__cuda_lib_dir" = "no" -a "$__cuda_dir" != "no" ; then
20574
 
        __cuda_lib_dir="$__cuda_dir/lib"
20575
 
    fi
20576
 
 
20577
 
    SAVED_CPPFLAGS="$CPPFLAGS"
20578
 
    SAVED_LDFLAGS="${LDFLAGS}"
20579
 
    SAVED_STARPU_CUDA_LDFLAGS=${STARPU_CUDA_LDFLAGS}
20580
 
 
20581
 
    if test "$__cuda_lib_dir" != "no" ; then
20582
 
        STARPU_CUDA_LDFLAGS="${SAVED_STARPU_CUDA_LDFLAGS} -L$__cuda_lib_dir"
20583
 
    fi
20584
 
    if test "$__cuda_include_dir" != "no" ; then
20585
 
        CPPFLAGS="${CPPFLAGS} -I$__cuda_include_dir"
20586
 
    fi
20587
 
 
20588
 
    ac_fn_c_check_header_mongrel "$LINENO" "cuda.h" "ac_cv_header_cuda_h" "$ac_includes_default"
20589
 
if test "x$ac_cv_header_cuda_h" = xyes; then :
20590
 
  have_valid_cuda=yes
20591
 
else
20592
 
  have_valid_cuda=no
20593
 
fi
20594
 
 
20595
 
 
20596
 
    unset ac_cv_header_cuda_h
20597
 
 
20598
 
    if test "$have_valid_cuda" = "yes" ; then
20599
 
        if test "$__cuda_lib_dir" != "no"; then
20600
 
            LDFLAGS="${SAVED_LDFLAGS} -L$__cuda_lib_dir"
20601
 
        fi
20602
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcudart" >&5
20603
 
$as_echo_n "checking for main in -lcudart... " >&6; }
20604
 
if ${ac_cv_lib_cudart_main+:} false; then :
20605
 
  $as_echo_n "(cached) " >&6
20606
 
else
20607
 
  ac_check_lib_save_LIBS=$LIBS
20608
 
LIBS="-lcudart  $LIBS"
20609
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20610
 
/* end confdefs.h.  */
20611
 
 
20612
 
 
20613
 
int
20614
 
main ()
20615
 
{
20616
 
return main ();
20617
 
  ;
20618
 
  return 0;
20619
 
}
20620
 
_ACEOF
20621
 
if ac_fn_c_try_link "$LINENO"; then :
20622
 
  ac_cv_lib_cudart_main=yes
20623
 
else
20624
 
  ac_cv_lib_cudart_main=no
20625
 
fi
20626
 
rm -f core conftest.err conftest.$ac_objext \
20627
 
    conftest$ac_exeext conftest.$ac_ext
20628
 
LIBS=$ac_check_lib_save_LIBS
20629
 
fi
20630
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cudart_main" >&5
20631
 
$as_echo "$ac_cv_lib_cudart_main" >&6; }
20632
 
if test "x$ac_cv_lib_cudart_main" = xyes; then :
20633
 
  have_valid_cuda=yes
20634
 
else
20635
 
  have_valid_cuda=no
20636
 
fi
20637
 
ac_cv_lib_cudart=ac_cv_lib_cudart_main
20638
 
 
20639
 
        unset ac_cv_lib_cudart_main
20640
 
        if test "$have_valid_cuda" = "no" ; then
20641
 
            if test "$cuda_lib_dir" = "no" -a "$__cuda_dir" != "no" ; then
20642
 
                __cuda_lib_dir="$__cuda_dir/lib64"
20643
 
                LDFLAGS="${SAVED_LDFLAGS} -L$__cuda_lib_dir"
20644
 
                STARPU_CUDA_LDFLAGS="${SAVED_STARPU_CUDA_LDFLAGS} -L$__cuda_lib_dir"
20645
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcudart" >&5
20646
 
$as_echo_n "checking for main in -lcudart... " >&6; }
20647
 
if ${ac_cv_lib_cudart_main+:} false; then :
20648
 
  $as_echo_n "(cached) " >&6
20649
 
else
20650
 
  ac_check_lib_save_LIBS=$LIBS
20651
 
LIBS="-lcudart  $LIBS"
20652
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20653
 
/* end confdefs.h.  */
20654
 
 
20655
 
 
20656
 
int
20657
 
main ()
20658
 
{
20659
 
return main ();
20660
 
  ;
20661
 
  return 0;
20662
 
}
20663
 
_ACEOF
20664
 
if ac_fn_c_try_link "$LINENO"; then :
20665
 
  ac_cv_lib_cudart_main=yes
20666
 
else
20667
 
  ac_cv_lib_cudart_main=no
20668
 
fi
20669
 
rm -f core conftest.err conftest.$ac_objext \
20670
 
    conftest$ac_exeext conftest.$ac_ext
20671
 
LIBS=$ac_check_lib_save_LIBS
20672
 
fi
20673
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cudart_main" >&5
20674
 
$as_echo "$ac_cv_lib_cudart_main" >&6; }
20675
 
if test "x$ac_cv_lib_cudart_main" = xyes; then :
20676
 
  have_valid_cuda=yes
20677
 
else
20678
 
  have_valid_cuda=no
20679
 
fi
20680
 
ac_cv_lib_cudart=ac_cv_lib_cudart_main
20681
 
 
20682
 
                unset ac_cv_lib_cudart_main
20683
 
            fi
20684
 
        fi
20685
 
    fi
20686
 
 
20687
 
    if test "$have_valid_cuda" = "yes" ; then
20688
 
        STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcudart"
20689
 
        LDFLAGS="${SAVED_LDFLAGS} ${STARPU_CUDA_LDFLAGS}"
20690
 
        # we also check that CUBLAS is available
20691
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcublas" >&5
20692
 
$as_echo_n "checking for main in -lcublas... " >&6; }
20693
 
if ${ac_cv_lib_cublas_main+:} false; then :
20694
 
  $as_echo_n "(cached) " >&6
20695
 
else
20696
 
  ac_check_lib_save_LIBS=$LIBS
20697
 
LIBS="-lcublas  $LIBS"
20698
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20699
 
/* end confdefs.h.  */
20700
 
 
20701
 
 
20702
 
int
20703
 
main ()
20704
 
{
20705
 
return main ();
20706
 
  ;
20707
 
  return 0;
20708
 
}
20709
 
_ACEOF
20710
 
if ac_fn_c_try_link "$LINENO"; then :
20711
 
  ac_cv_lib_cublas_main=yes
20712
 
else
20713
 
  ac_cv_lib_cublas_main=no
20714
 
fi
20715
 
rm -f core conftest.err conftest.$ac_objext \
20716
 
    conftest$ac_exeext conftest.$ac_ext
20717
 
LIBS=$ac_check_lib_save_LIBS
20718
 
fi
20719
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cublas_main" >&5
20720
 
$as_echo "$ac_cv_lib_cublas_main" >&6; }
20721
 
if test "x$ac_cv_lib_cublas_main" = xyes; then :
20722
 
  have_valid_cuda=yes
20723
 
else
20724
 
  have_valid_cuda=no
20725
 
fi
20726
 
ac_cv_lib_cublas=ac_cv_lib_cublas_main
20727
 
 
20728
 
        unset ac_cv_lib_cublas_main
20729
 
        if test "$have_valid_cuda" = "yes" ; then
20730
 
            STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
20731
 
        fi
20732
 
    fi
20733
 
 
20734
 
    CPPFLAGS="${SAVED_CPPFLAGS}"
20735
 
    LDFLAGS="${SAVED_LDFLAGS}"
20736
 
 
20737
 
    if test "$have_valid_cuda" = "yes" -a "$__cuda_include_dir" != "no"; then
20738
 
        STARPU_CUDA_CPPFLAGS="-I$__cuda_include_dir"
20739
 
        NVCCFLAGS="${NVCCFLAGS} -I$__cuda_include_dir"
20740
 
    fi
20741
 
 
20742
 
        if test "$have_valid_cuda" = "no" ; then
20743
 
            for f in "/usr/local/cuda" "/c/cuda" "/cygdrive/c/cuda" "/opt/cuda" "$CUDA_INC_PATH/.." "$CUDA_INSTALL_PATH" "$CUDA_TOOLKIT"; do
20744
 
 
20745
 
    __cuda_dir=$f
 
20340
    __cuda_dir="$cuda_dir"
 
20341
    __cuda_include_dir="$cuda_include_dir"
 
20342
    __cuda_lib_dir="$cuda_lib_dir"
 
20343
 
 
20344
    if test -z "$__cuda_lib_dir" ; then
 
20345
        __cuda_lib_dir=no
 
20346
    fi
 
20347
    if test -z "$__cuda_include_dir" ; then
 
20348
        __cuda_include_dir=no
 
20349
    fi
 
20350
    if test -z "$__cuda_dir" ; then
 
20351
        __cuda_dir=no
 
20352
    fi
 
20353
 
 
20354
    if test "$__cuda_dir" != "no" ; then
 
20355
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available in $__cuda_dir" >&5
 
20356
$as_echo_n "checking whether CUDA is available in $__cuda_dir... " >&6; }
 
20357
    else
 
20358
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available" >&5
 
20359
$as_echo_n "checking whether CUDA is available... " >&6; }
 
20360
    fi
 
20361
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
20362
$as_echo "" >&6; }
 
20363
 
 
20364
    if test "$__cuda_include_dir" = "no" -a "$__cuda_dir" != "no" ; then
 
20365
        __cuda_include_dir="$__cuda_dir/include"
 
20366
    fi
 
20367
 
 
20368
    SAVED_CPPFLAGS="$CPPFLAGS"
 
20369
    have_valid_cuda=no
 
20370
 
 
20371
    if test "$__cuda_include_dir" != "no" ; then
 
20372
        CPPFLAGS="${CPPFLAGS} -I$__cuda_include_dir"
 
20373
    fi
 
20374
 
 
20375
    ac_fn_c_check_header_mongrel "$LINENO" "cuda.h" "ac_cv_header_cuda_h" "$ac_includes_default"
 
20376
if test "x$ac_cv_header_cuda_h" = xyes; then :
 
20377
  have_valid_cuda=yes
 
20378
else
 
20379
  have_valid_cuda=no
 
20380
fi
 
20381
 
 
20382
 
 
20383
    unset ac_cv_header_cuda_h
 
20384
 
 
20385
    if test "$have_valid_cuda" = "yes" ; then
 
20386
        if test "$__cuda_lib_dir" != "no" ; then
 
20387
 
 
20388
    __cuda_L="-L${__cuda_lib_dir}"
 
20389
    SAVED_LDFLAGS="${LDFLAGS}"
 
20390
    STARPU_CUDA_LDFLAGS="${__cuda_L}"
 
20391
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available with: $__cuda_L" >&5
 
20392
$as_echo_n "checking whether CUDA is available with: $__cuda_L... " >&6; }
 
20393
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
20394
$as_echo "" >&6; }
 
20395
    LDFLAGS="${SAVED_LDFLAGS} ${__cuda_L}"
 
20396
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcuda" >&5
 
20397
$as_echo_n "checking for main in -lcuda... " >&6; }
 
20398
if ${ac_cv_lib_cuda_main+:} false; then :
 
20399
  $as_echo_n "(cached) " >&6
 
20400
else
 
20401
  ac_check_lib_save_LIBS=$LIBS
 
20402
LIBS="-lcuda  $LIBS"
 
20403
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20404
/* end confdefs.h.  */
 
20405
 
 
20406
 
 
20407
int
 
20408
main ()
 
20409
{
 
20410
return main ();
 
20411
  ;
 
20412
  return 0;
 
20413
}
 
20414
_ACEOF
 
20415
if ac_fn_c_try_link "$LINENO"; then :
 
20416
  ac_cv_lib_cuda_main=yes
 
20417
else
 
20418
  ac_cv_lib_cuda_main=no
 
20419
fi
 
20420
rm -f core conftest.err conftest.$ac_objext \
 
20421
    conftest$ac_exeext conftest.$ac_ext
 
20422
LIBS=$ac_check_lib_save_LIBS
 
20423
fi
 
20424
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cuda_main" >&5
 
20425
$as_echo "$ac_cv_lib_cuda_main" >&6; }
 
20426
if test "x$ac_cv_lib_cuda_main" = xyes; then :
 
20427
  have_valid_cuda=yes
 
20428
else
 
20429
  have_valid_cuda=no
 
20430
fi
 
20431
ac_cv_lib_cuda=ac_cv_lib_cuda_main
 
20432
 
 
20433
    unset ac_cv_lib_cuda_main
 
20434
    if test "$have_valid_cuda" = "yes" ; then
 
20435
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcudart" >&5
 
20436
$as_echo_n "checking for main in -lcudart... " >&6; }
 
20437
if ${ac_cv_lib_cudart_main+:} false; then :
 
20438
  $as_echo_n "(cached) " >&6
 
20439
else
 
20440
  ac_check_lib_save_LIBS=$LIBS
 
20441
LIBS="-lcudart  $LIBS"
 
20442
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20443
/* end confdefs.h.  */
 
20444
 
 
20445
 
 
20446
int
 
20447
main ()
 
20448
{
 
20449
return main ();
 
20450
  ;
 
20451
  return 0;
 
20452
}
 
20453
_ACEOF
 
20454
if ac_fn_c_try_link "$LINENO"; then :
 
20455
  ac_cv_lib_cudart_main=yes
 
20456
else
 
20457
  ac_cv_lib_cudart_main=no
 
20458
fi
 
20459
rm -f core conftest.err conftest.$ac_objext \
 
20460
    conftest$ac_exeext conftest.$ac_ext
 
20461
LIBS=$ac_check_lib_save_LIBS
 
20462
fi
 
20463
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cudart_main" >&5
 
20464
$as_echo "$ac_cv_lib_cudart_main" >&6; }
 
20465
if test "x$ac_cv_lib_cudart_main" = xyes; then :
 
20466
  have_valid_cuda=yes
 
20467
else
 
20468
  have_valid_cuda=no
 
20469
fi
 
20470
ac_cv_lib_cudart=ac_cv_lib_cudart_main
 
20471
 
 
20472
        unset ac_cv_lib_cudart_main
 
20473
        if test "$have_valid_cuda" = yes ; then
 
20474
            STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcudart"
 
20475
            LDFLAGS="${SAVED_LDFLAGS} ${STARPU_CUDA_LDFLAGS}"
 
20476
            # we also check that CUBLAS is available
 
20477
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcublas" >&5
 
20478
$as_echo_n "checking for main in -lcublas... " >&6; }
 
20479
if ${ac_cv_lib_cublas_main+:} false; then :
 
20480
  $as_echo_n "(cached) " >&6
 
20481
else
 
20482
  ac_check_lib_save_LIBS=$LIBS
 
20483
LIBS="-lcublas  $LIBS"
 
20484
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20485
/* end confdefs.h.  */
 
20486
 
 
20487
 
 
20488
int
 
20489
main ()
 
20490
{
 
20491
return main ();
 
20492
  ;
 
20493
  return 0;
 
20494
}
 
20495
_ACEOF
 
20496
if ac_fn_c_try_link "$LINENO"; then :
 
20497
  ac_cv_lib_cublas_main=yes
 
20498
else
 
20499
  ac_cv_lib_cublas_main=no
 
20500
fi
 
20501
rm -f core conftest.err conftest.$ac_objext \
 
20502
    conftest$ac_exeext conftest.$ac_ext
 
20503
LIBS=$ac_check_lib_save_LIBS
 
20504
fi
 
20505
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cublas_main" >&5
 
20506
$as_echo "$ac_cv_lib_cublas_main" >&6; }
 
20507
if test "x$ac_cv_lib_cublas_main" = xyes; then :
 
20508
  have_valid_cuda=yes
 
20509
else
 
20510
  have_valid_cuda=no
 
20511
fi
 
20512
ac_cv_lib_cublas=ac_cv_lib_cublas_main
 
20513
 
 
20514
            unset ac_cv_lib_cublas_main
 
20515
            if test "$have_valid_cuda" = "yes" ; then
 
20516
                STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
 
20517
            fi
 
20518
        fi
 
20519
    fi
 
20520
    LDFLAGS="${SAVED_LDFLAGS}"
 
20521
 
 
20522
        else
 
20523
            if test "$__cuda_dir" != "no" ; then
 
20524
                for __cuda_libdir in lib64 lib lib/x64 lib/Win32 ; do
 
20525
 
 
20526
    __cuda_L="-L${__cuda_dir}/${__cuda_libdir}"
 
20527
    SAVED_LDFLAGS="${LDFLAGS}"
 
20528
    STARPU_CUDA_LDFLAGS="${__cuda_L}"
 
20529
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available with: $__cuda_L" >&5
 
20530
$as_echo_n "checking whether CUDA is available with: $__cuda_L... " >&6; }
 
20531
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
20532
$as_echo "" >&6; }
 
20533
    LDFLAGS="${SAVED_LDFLAGS} ${__cuda_L}"
 
20534
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcuda" >&5
 
20535
$as_echo_n "checking for main in -lcuda... " >&6; }
 
20536
if ${ac_cv_lib_cuda_main+:} false; then :
 
20537
  $as_echo_n "(cached) " >&6
 
20538
else
 
20539
  ac_check_lib_save_LIBS=$LIBS
 
20540
LIBS="-lcuda  $LIBS"
 
20541
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20542
/* end confdefs.h.  */
 
20543
 
 
20544
 
 
20545
int
 
20546
main ()
 
20547
{
 
20548
return main ();
 
20549
  ;
 
20550
  return 0;
 
20551
}
 
20552
_ACEOF
 
20553
if ac_fn_c_try_link "$LINENO"; then :
 
20554
  ac_cv_lib_cuda_main=yes
 
20555
else
 
20556
  ac_cv_lib_cuda_main=no
 
20557
fi
 
20558
rm -f core conftest.err conftest.$ac_objext \
 
20559
    conftest$ac_exeext conftest.$ac_ext
 
20560
LIBS=$ac_check_lib_save_LIBS
 
20561
fi
 
20562
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cuda_main" >&5
 
20563
$as_echo "$ac_cv_lib_cuda_main" >&6; }
 
20564
if test "x$ac_cv_lib_cuda_main" = xyes; then :
 
20565
  have_valid_cuda=yes
 
20566
else
 
20567
  have_valid_cuda=no
 
20568
fi
 
20569
ac_cv_lib_cuda=ac_cv_lib_cuda_main
 
20570
 
 
20571
    unset ac_cv_lib_cuda_main
 
20572
    if test "$have_valid_cuda" = "yes" ; then
 
20573
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcudart" >&5
 
20574
$as_echo_n "checking for main in -lcudart... " >&6; }
 
20575
if ${ac_cv_lib_cudart_main+:} false; then :
 
20576
  $as_echo_n "(cached) " >&6
 
20577
else
 
20578
  ac_check_lib_save_LIBS=$LIBS
 
20579
LIBS="-lcudart  $LIBS"
 
20580
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20581
/* end confdefs.h.  */
 
20582
 
 
20583
 
 
20584
int
 
20585
main ()
 
20586
{
 
20587
return main ();
 
20588
  ;
 
20589
  return 0;
 
20590
}
 
20591
_ACEOF
 
20592
if ac_fn_c_try_link "$LINENO"; then :
 
20593
  ac_cv_lib_cudart_main=yes
 
20594
else
 
20595
  ac_cv_lib_cudart_main=no
 
20596
fi
 
20597
rm -f core conftest.err conftest.$ac_objext \
 
20598
    conftest$ac_exeext conftest.$ac_ext
 
20599
LIBS=$ac_check_lib_save_LIBS
 
20600
fi
 
20601
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cudart_main" >&5
 
20602
$as_echo "$ac_cv_lib_cudart_main" >&6; }
 
20603
if test "x$ac_cv_lib_cudart_main" = xyes; then :
 
20604
  have_valid_cuda=yes
 
20605
else
 
20606
  have_valid_cuda=no
 
20607
fi
 
20608
ac_cv_lib_cudart=ac_cv_lib_cudart_main
 
20609
 
 
20610
        unset ac_cv_lib_cudart_main
 
20611
        if test "$have_valid_cuda" = yes ; then
 
20612
            STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcudart"
 
20613
            LDFLAGS="${SAVED_LDFLAGS} ${STARPU_CUDA_LDFLAGS}"
 
20614
            # we also check that CUBLAS is available
 
20615
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcublas" >&5
 
20616
$as_echo_n "checking for main in -lcublas... " >&6; }
 
20617
if ${ac_cv_lib_cublas_main+:} false; then :
 
20618
  $as_echo_n "(cached) " >&6
 
20619
else
 
20620
  ac_check_lib_save_LIBS=$LIBS
 
20621
LIBS="-lcublas  $LIBS"
 
20622
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20623
/* end confdefs.h.  */
 
20624
 
 
20625
 
 
20626
int
 
20627
main ()
 
20628
{
 
20629
return main ();
 
20630
  ;
 
20631
  return 0;
 
20632
}
 
20633
_ACEOF
 
20634
if ac_fn_c_try_link "$LINENO"; then :
 
20635
  ac_cv_lib_cublas_main=yes
 
20636
else
 
20637
  ac_cv_lib_cublas_main=no
 
20638
fi
 
20639
rm -f core conftest.err conftest.$ac_objext \
 
20640
    conftest$ac_exeext conftest.$ac_ext
 
20641
LIBS=$ac_check_lib_save_LIBS
 
20642
fi
 
20643
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cublas_main" >&5
 
20644
$as_echo "$ac_cv_lib_cublas_main" >&6; }
 
20645
if test "x$ac_cv_lib_cublas_main" = xyes; then :
 
20646
  have_valid_cuda=yes
 
20647
else
 
20648
  have_valid_cuda=no
 
20649
fi
 
20650
ac_cv_lib_cublas=ac_cv_lib_cublas_main
 
20651
 
 
20652
            unset ac_cv_lib_cublas_main
 
20653
            if test "$have_valid_cuda" = "yes" ; then
 
20654
                STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
 
20655
            fi
 
20656
        fi
 
20657
    fi
 
20658
    LDFLAGS="${SAVED_LDFLAGS}"
 
20659
 
 
20660
                    if test "$have_valid_cuda" = yes ; then
 
20661
                        break
 
20662
                    fi
 
20663
                done
 
20664
            else
 
20665
 
 
20666
    __cuda_L=""
 
20667
    SAVED_LDFLAGS="${LDFLAGS}"
 
20668
    STARPU_CUDA_LDFLAGS="${__cuda_L}"
 
20669
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available with: $__cuda_L" >&5
 
20670
$as_echo_n "checking whether CUDA is available with: $__cuda_L... " >&6; }
 
20671
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
20672
$as_echo "" >&6; }
 
20673
    LDFLAGS="${SAVED_LDFLAGS} ${__cuda_L}"
 
20674
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcuda" >&5
 
20675
$as_echo_n "checking for main in -lcuda... " >&6; }
 
20676
if ${ac_cv_lib_cuda_main+:} false; then :
 
20677
  $as_echo_n "(cached) " >&6
 
20678
else
 
20679
  ac_check_lib_save_LIBS=$LIBS
 
20680
LIBS="-lcuda  $LIBS"
 
20681
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20682
/* end confdefs.h.  */
 
20683
 
 
20684
 
 
20685
int
 
20686
main ()
 
20687
{
 
20688
return main ();
 
20689
  ;
 
20690
  return 0;
 
20691
}
 
20692
_ACEOF
 
20693
if ac_fn_c_try_link "$LINENO"; then :
 
20694
  ac_cv_lib_cuda_main=yes
 
20695
else
 
20696
  ac_cv_lib_cuda_main=no
 
20697
fi
 
20698
rm -f core conftest.err conftest.$ac_objext \
 
20699
    conftest$ac_exeext conftest.$ac_ext
 
20700
LIBS=$ac_check_lib_save_LIBS
 
20701
fi
 
20702
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cuda_main" >&5
 
20703
$as_echo "$ac_cv_lib_cuda_main" >&6; }
 
20704
if test "x$ac_cv_lib_cuda_main" = xyes; then :
 
20705
  have_valid_cuda=yes
 
20706
else
 
20707
  have_valid_cuda=no
 
20708
fi
 
20709
ac_cv_lib_cuda=ac_cv_lib_cuda_main
 
20710
 
 
20711
    unset ac_cv_lib_cuda_main
 
20712
    if test "$have_valid_cuda" = "yes" ; then
 
20713
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcudart" >&5
 
20714
$as_echo_n "checking for main in -lcudart... " >&6; }
 
20715
if ${ac_cv_lib_cudart_main+:} false; then :
 
20716
  $as_echo_n "(cached) " >&6
 
20717
else
 
20718
  ac_check_lib_save_LIBS=$LIBS
 
20719
LIBS="-lcudart  $LIBS"
 
20720
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20721
/* end confdefs.h.  */
 
20722
 
 
20723
 
 
20724
int
 
20725
main ()
 
20726
{
 
20727
return main ();
 
20728
  ;
 
20729
  return 0;
 
20730
}
 
20731
_ACEOF
 
20732
if ac_fn_c_try_link "$LINENO"; then :
 
20733
  ac_cv_lib_cudart_main=yes
 
20734
else
 
20735
  ac_cv_lib_cudart_main=no
 
20736
fi
 
20737
rm -f core conftest.err conftest.$ac_objext \
 
20738
    conftest$ac_exeext conftest.$ac_ext
 
20739
LIBS=$ac_check_lib_save_LIBS
 
20740
fi
 
20741
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cudart_main" >&5
 
20742
$as_echo "$ac_cv_lib_cudart_main" >&6; }
 
20743
if test "x$ac_cv_lib_cudart_main" = xyes; then :
 
20744
  have_valid_cuda=yes
 
20745
else
 
20746
  have_valid_cuda=no
 
20747
fi
 
20748
ac_cv_lib_cudart=ac_cv_lib_cudart_main
 
20749
 
 
20750
        unset ac_cv_lib_cudart_main
 
20751
        if test "$have_valid_cuda" = yes ; then
 
20752
            STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcudart"
 
20753
            LDFLAGS="${SAVED_LDFLAGS} ${STARPU_CUDA_LDFLAGS}"
 
20754
            # we also check that CUBLAS is available
 
20755
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcublas" >&5
 
20756
$as_echo_n "checking for main in -lcublas... " >&6; }
 
20757
if ${ac_cv_lib_cublas_main+:} false; then :
 
20758
  $as_echo_n "(cached) " >&6
 
20759
else
 
20760
  ac_check_lib_save_LIBS=$LIBS
 
20761
LIBS="-lcublas  $LIBS"
 
20762
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20763
/* end confdefs.h.  */
 
20764
 
 
20765
 
 
20766
int
 
20767
main ()
 
20768
{
 
20769
return main ();
 
20770
  ;
 
20771
  return 0;
 
20772
}
 
20773
_ACEOF
 
20774
if ac_fn_c_try_link "$LINENO"; then :
 
20775
  ac_cv_lib_cublas_main=yes
 
20776
else
 
20777
  ac_cv_lib_cublas_main=no
 
20778
fi
 
20779
rm -f core conftest.err conftest.$ac_objext \
 
20780
    conftest$ac_exeext conftest.$ac_ext
 
20781
LIBS=$ac_check_lib_save_LIBS
 
20782
fi
 
20783
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cublas_main" >&5
 
20784
$as_echo "$ac_cv_lib_cublas_main" >&6; }
 
20785
if test "x$ac_cv_lib_cublas_main" = xyes; then :
 
20786
  have_valid_cuda=yes
 
20787
else
 
20788
  have_valid_cuda=no
 
20789
fi
 
20790
ac_cv_lib_cublas=ac_cv_lib_cublas_main
 
20791
 
 
20792
            unset ac_cv_lib_cublas_main
 
20793
            if test "$have_valid_cuda" = "yes" ; then
 
20794
                STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
 
20795
            fi
 
20796
        fi
 
20797
    fi
 
20798
    LDFLAGS="${SAVED_LDFLAGS}"
 
20799
 
 
20800
            fi
 
20801
        fi
 
20802
    fi
 
20803
 
 
20804
    if test "$have_valid_cuda" = "no" ; then
 
20805
        CPPFLAGS="${SAVED_CPPFLAGS}"
 
20806
        unset STARPU_CUDA_LDFLAGS
 
20807
    else
 
20808
        if test "$__cuda_include_dir" != "no"; then
 
20809
            STARPU_CUDA_CPPFLAGS="-I$__cuda_include_dir"
 
20810
            NVCCFLAGS="${NVCCFLAGS} -I$__cuda_include_dir"
 
20811
        fi
 
20812
    fi
 
20813
 
 
20814
    if test "$have_valid_cuda" = "no" ; then
 
20815
 
 
20816
    __cuda_dir="$CUDA_PATH"
 
20817
    __cuda_include_dir="$CUDA_INC_PATH"
 
20818
    __cuda_lib_dir="$CUDA_LIB_PATH"
 
20819
 
 
20820
    if test -z "$__cuda_lib_dir" ; then
 
20821
        __cuda_lib_dir=no
 
20822
    fi
 
20823
    if test -z "$__cuda_include_dir" ; then
 
20824
        __cuda_include_dir=no
 
20825
    fi
 
20826
    if test -z "$__cuda_dir" ; then
 
20827
        __cuda_dir=no
 
20828
    fi
 
20829
 
 
20830
    if test "$__cuda_dir" != "no" ; then
 
20831
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available in $__cuda_dir" >&5
 
20832
$as_echo_n "checking whether CUDA is available in $__cuda_dir... " >&6; }
 
20833
    else
 
20834
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available" >&5
 
20835
$as_echo_n "checking whether CUDA is available... " >&6; }
 
20836
    fi
 
20837
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
20838
$as_echo "" >&6; }
 
20839
 
 
20840
    if test "$__cuda_include_dir" = "no" -a "$__cuda_dir" != "no" ; then
 
20841
        __cuda_include_dir="$__cuda_dir/include"
 
20842
    fi
 
20843
 
 
20844
    SAVED_CPPFLAGS="$CPPFLAGS"
 
20845
    have_valid_cuda=no
 
20846
 
 
20847
    if test "$__cuda_include_dir" != "no" ; then
 
20848
        CPPFLAGS="${CPPFLAGS} -I$__cuda_include_dir"
 
20849
    fi
 
20850
 
 
20851
    ac_fn_c_check_header_mongrel "$LINENO" "cuda.h" "ac_cv_header_cuda_h" "$ac_includes_default"
 
20852
if test "x$ac_cv_header_cuda_h" = xyes; then :
 
20853
  have_valid_cuda=yes
 
20854
else
 
20855
  have_valid_cuda=no
 
20856
fi
 
20857
 
 
20858
 
 
20859
    unset ac_cv_header_cuda_h
 
20860
 
 
20861
    if test "$have_valid_cuda" = "yes" ; then
 
20862
        if test "$__cuda_lib_dir" != "no" ; then
 
20863
 
 
20864
    __cuda_L="-L${__cuda_lib_dir}"
 
20865
    SAVED_LDFLAGS="${LDFLAGS}"
 
20866
    STARPU_CUDA_LDFLAGS="${__cuda_L}"
 
20867
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available with: $__cuda_L" >&5
 
20868
$as_echo_n "checking whether CUDA is available with: $__cuda_L... " >&6; }
 
20869
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
20870
$as_echo "" >&6; }
 
20871
    LDFLAGS="${SAVED_LDFLAGS} ${__cuda_L}"
 
20872
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcuda" >&5
 
20873
$as_echo_n "checking for main in -lcuda... " >&6; }
 
20874
if ${ac_cv_lib_cuda_main+:} false; then :
 
20875
  $as_echo_n "(cached) " >&6
 
20876
else
 
20877
  ac_check_lib_save_LIBS=$LIBS
 
20878
LIBS="-lcuda  $LIBS"
 
20879
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20880
/* end confdefs.h.  */
 
20881
 
 
20882
 
 
20883
int
 
20884
main ()
 
20885
{
 
20886
return main ();
 
20887
  ;
 
20888
  return 0;
 
20889
}
 
20890
_ACEOF
 
20891
if ac_fn_c_try_link "$LINENO"; then :
 
20892
  ac_cv_lib_cuda_main=yes
 
20893
else
 
20894
  ac_cv_lib_cuda_main=no
 
20895
fi
 
20896
rm -f core conftest.err conftest.$ac_objext \
 
20897
    conftest$ac_exeext conftest.$ac_ext
 
20898
LIBS=$ac_check_lib_save_LIBS
 
20899
fi
 
20900
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cuda_main" >&5
 
20901
$as_echo "$ac_cv_lib_cuda_main" >&6; }
 
20902
if test "x$ac_cv_lib_cuda_main" = xyes; then :
 
20903
  have_valid_cuda=yes
 
20904
else
 
20905
  have_valid_cuda=no
 
20906
fi
 
20907
ac_cv_lib_cuda=ac_cv_lib_cuda_main
 
20908
 
 
20909
    unset ac_cv_lib_cuda_main
 
20910
    if test "$have_valid_cuda" = "yes" ; then
 
20911
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcudart" >&5
 
20912
$as_echo_n "checking for main in -lcudart... " >&6; }
 
20913
if ${ac_cv_lib_cudart_main+:} false; then :
 
20914
  $as_echo_n "(cached) " >&6
 
20915
else
 
20916
  ac_check_lib_save_LIBS=$LIBS
 
20917
LIBS="-lcudart  $LIBS"
 
20918
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20919
/* end confdefs.h.  */
 
20920
 
 
20921
 
 
20922
int
 
20923
main ()
 
20924
{
 
20925
return main ();
 
20926
  ;
 
20927
  return 0;
 
20928
}
 
20929
_ACEOF
 
20930
if ac_fn_c_try_link "$LINENO"; then :
 
20931
  ac_cv_lib_cudart_main=yes
 
20932
else
 
20933
  ac_cv_lib_cudart_main=no
 
20934
fi
 
20935
rm -f core conftest.err conftest.$ac_objext \
 
20936
    conftest$ac_exeext conftest.$ac_ext
 
20937
LIBS=$ac_check_lib_save_LIBS
 
20938
fi
 
20939
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cudart_main" >&5
 
20940
$as_echo "$ac_cv_lib_cudart_main" >&6; }
 
20941
if test "x$ac_cv_lib_cudart_main" = xyes; then :
 
20942
  have_valid_cuda=yes
 
20943
else
 
20944
  have_valid_cuda=no
 
20945
fi
 
20946
ac_cv_lib_cudart=ac_cv_lib_cudart_main
 
20947
 
 
20948
        unset ac_cv_lib_cudart_main
 
20949
        if test "$have_valid_cuda" = yes ; then
 
20950
            STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcudart"
 
20951
            LDFLAGS="${SAVED_LDFLAGS} ${STARPU_CUDA_LDFLAGS}"
 
20952
            # we also check that CUBLAS is available
 
20953
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcublas" >&5
 
20954
$as_echo_n "checking for main in -lcublas... " >&6; }
 
20955
if ${ac_cv_lib_cublas_main+:} false; then :
 
20956
  $as_echo_n "(cached) " >&6
 
20957
else
 
20958
  ac_check_lib_save_LIBS=$LIBS
 
20959
LIBS="-lcublas  $LIBS"
 
20960
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
20961
/* end confdefs.h.  */
 
20962
 
 
20963
 
 
20964
int
 
20965
main ()
 
20966
{
 
20967
return main ();
 
20968
  ;
 
20969
  return 0;
 
20970
}
 
20971
_ACEOF
 
20972
if ac_fn_c_try_link "$LINENO"; then :
 
20973
  ac_cv_lib_cublas_main=yes
 
20974
else
 
20975
  ac_cv_lib_cublas_main=no
 
20976
fi
 
20977
rm -f core conftest.err conftest.$ac_objext \
 
20978
    conftest$ac_exeext conftest.$ac_ext
 
20979
LIBS=$ac_check_lib_save_LIBS
 
20980
fi
 
20981
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cublas_main" >&5
 
20982
$as_echo "$ac_cv_lib_cublas_main" >&6; }
 
20983
if test "x$ac_cv_lib_cublas_main" = xyes; then :
 
20984
  have_valid_cuda=yes
 
20985
else
 
20986
  have_valid_cuda=no
 
20987
fi
 
20988
ac_cv_lib_cublas=ac_cv_lib_cublas_main
 
20989
 
 
20990
            unset ac_cv_lib_cublas_main
 
20991
            if test "$have_valid_cuda" = "yes" ; then
 
20992
                STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
 
20993
            fi
 
20994
        fi
 
20995
    fi
 
20996
    LDFLAGS="${SAVED_LDFLAGS}"
 
20997
 
 
20998
        else
 
20999
            if test "$__cuda_dir" != "no" ; then
 
21000
                for __cuda_libdir in lib64 lib lib/x64 lib/Win32 ; do
 
21001
 
 
21002
    __cuda_L="-L${__cuda_dir}/${__cuda_libdir}"
 
21003
    SAVED_LDFLAGS="${LDFLAGS}"
 
21004
    STARPU_CUDA_LDFLAGS="${__cuda_L}"
 
21005
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available with: $__cuda_L" >&5
 
21006
$as_echo_n "checking whether CUDA is available with: $__cuda_L... " >&6; }
 
21007
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
21008
$as_echo "" >&6; }
 
21009
    LDFLAGS="${SAVED_LDFLAGS} ${__cuda_L}"
 
21010
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcuda" >&5
 
21011
$as_echo_n "checking for main in -lcuda... " >&6; }
 
21012
if ${ac_cv_lib_cuda_main+:} false; then :
 
21013
  $as_echo_n "(cached) " >&6
 
21014
else
 
21015
  ac_check_lib_save_LIBS=$LIBS
 
21016
LIBS="-lcuda  $LIBS"
 
21017
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21018
/* end confdefs.h.  */
 
21019
 
 
21020
 
 
21021
int
 
21022
main ()
 
21023
{
 
21024
return main ();
 
21025
  ;
 
21026
  return 0;
 
21027
}
 
21028
_ACEOF
 
21029
if ac_fn_c_try_link "$LINENO"; then :
 
21030
  ac_cv_lib_cuda_main=yes
 
21031
else
 
21032
  ac_cv_lib_cuda_main=no
 
21033
fi
 
21034
rm -f core conftest.err conftest.$ac_objext \
 
21035
    conftest$ac_exeext conftest.$ac_ext
 
21036
LIBS=$ac_check_lib_save_LIBS
 
21037
fi
 
21038
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cuda_main" >&5
 
21039
$as_echo "$ac_cv_lib_cuda_main" >&6; }
 
21040
if test "x$ac_cv_lib_cuda_main" = xyes; then :
 
21041
  have_valid_cuda=yes
 
21042
else
 
21043
  have_valid_cuda=no
 
21044
fi
 
21045
ac_cv_lib_cuda=ac_cv_lib_cuda_main
 
21046
 
 
21047
    unset ac_cv_lib_cuda_main
 
21048
    if test "$have_valid_cuda" = "yes" ; then
 
21049
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcudart" >&5
 
21050
$as_echo_n "checking for main in -lcudart... " >&6; }
 
21051
if ${ac_cv_lib_cudart_main+:} false; then :
 
21052
  $as_echo_n "(cached) " >&6
 
21053
else
 
21054
  ac_check_lib_save_LIBS=$LIBS
 
21055
LIBS="-lcudart  $LIBS"
 
21056
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21057
/* end confdefs.h.  */
 
21058
 
 
21059
 
 
21060
int
 
21061
main ()
 
21062
{
 
21063
return main ();
 
21064
  ;
 
21065
  return 0;
 
21066
}
 
21067
_ACEOF
 
21068
if ac_fn_c_try_link "$LINENO"; then :
 
21069
  ac_cv_lib_cudart_main=yes
 
21070
else
 
21071
  ac_cv_lib_cudart_main=no
 
21072
fi
 
21073
rm -f core conftest.err conftest.$ac_objext \
 
21074
    conftest$ac_exeext conftest.$ac_ext
 
21075
LIBS=$ac_check_lib_save_LIBS
 
21076
fi
 
21077
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cudart_main" >&5
 
21078
$as_echo "$ac_cv_lib_cudart_main" >&6; }
 
21079
if test "x$ac_cv_lib_cudart_main" = xyes; then :
 
21080
  have_valid_cuda=yes
 
21081
else
 
21082
  have_valid_cuda=no
 
21083
fi
 
21084
ac_cv_lib_cudart=ac_cv_lib_cudart_main
 
21085
 
 
21086
        unset ac_cv_lib_cudart_main
 
21087
        if test "$have_valid_cuda" = yes ; then
 
21088
            STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcudart"
 
21089
            LDFLAGS="${SAVED_LDFLAGS} ${STARPU_CUDA_LDFLAGS}"
 
21090
            # we also check that CUBLAS is available
 
21091
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcublas" >&5
 
21092
$as_echo_n "checking for main in -lcublas... " >&6; }
 
21093
if ${ac_cv_lib_cublas_main+:} false; then :
 
21094
  $as_echo_n "(cached) " >&6
 
21095
else
 
21096
  ac_check_lib_save_LIBS=$LIBS
 
21097
LIBS="-lcublas  $LIBS"
 
21098
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21099
/* end confdefs.h.  */
 
21100
 
 
21101
 
 
21102
int
 
21103
main ()
 
21104
{
 
21105
return main ();
 
21106
  ;
 
21107
  return 0;
 
21108
}
 
21109
_ACEOF
 
21110
if ac_fn_c_try_link "$LINENO"; then :
 
21111
  ac_cv_lib_cublas_main=yes
 
21112
else
 
21113
  ac_cv_lib_cublas_main=no
 
21114
fi
 
21115
rm -f core conftest.err conftest.$ac_objext \
 
21116
    conftest$ac_exeext conftest.$ac_ext
 
21117
LIBS=$ac_check_lib_save_LIBS
 
21118
fi
 
21119
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cublas_main" >&5
 
21120
$as_echo "$ac_cv_lib_cublas_main" >&6; }
 
21121
if test "x$ac_cv_lib_cublas_main" = xyes; then :
 
21122
  have_valid_cuda=yes
 
21123
else
 
21124
  have_valid_cuda=no
 
21125
fi
 
21126
ac_cv_lib_cublas=ac_cv_lib_cublas_main
 
21127
 
 
21128
            unset ac_cv_lib_cublas_main
 
21129
            if test "$have_valid_cuda" = "yes" ; then
 
21130
                STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
 
21131
            fi
 
21132
        fi
 
21133
    fi
 
21134
    LDFLAGS="${SAVED_LDFLAGS}"
 
21135
 
 
21136
                    if test "$have_valid_cuda" = yes ; then
 
21137
                        break
 
21138
                    fi
 
21139
                done
 
21140
            else
 
21141
 
 
21142
    __cuda_L=""
 
21143
    SAVED_LDFLAGS="${LDFLAGS}"
 
21144
    STARPU_CUDA_LDFLAGS="${__cuda_L}"
 
21145
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available with: $__cuda_L" >&5
 
21146
$as_echo_n "checking whether CUDA is available with: $__cuda_L... " >&6; }
 
21147
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
21148
$as_echo "" >&6; }
 
21149
    LDFLAGS="${SAVED_LDFLAGS} ${__cuda_L}"
 
21150
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcuda" >&5
 
21151
$as_echo_n "checking for main in -lcuda... " >&6; }
 
21152
if ${ac_cv_lib_cuda_main+:} false; then :
 
21153
  $as_echo_n "(cached) " >&6
 
21154
else
 
21155
  ac_check_lib_save_LIBS=$LIBS
 
21156
LIBS="-lcuda  $LIBS"
 
21157
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21158
/* end confdefs.h.  */
 
21159
 
 
21160
 
 
21161
int
 
21162
main ()
 
21163
{
 
21164
return main ();
 
21165
  ;
 
21166
  return 0;
 
21167
}
 
21168
_ACEOF
 
21169
if ac_fn_c_try_link "$LINENO"; then :
 
21170
  ac_cv_lib_cuda_main=yes
 
21171
else
 
21172
  ac_cv_lib_cuda_main=no
 
21173
fi
 
21174
rm -f core conftest.err conftest.$ac_objext \
 
21175
    conftest$ac_exeext conftest.$ac_ext
 
21176
LIBS=$ac_check_lib_save_LIBS
 
21177
fi
 
21178
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cuda_main" >&5
 
21179
$as_echo "$ac_cv_lib_cuda_main" >&6; }
 
21180
if test "x$ac_cv_lib_cuda_main" = xyes; then :
 
21181
  have_valid_cuda=yes
 
21182
else
 
21183
  have_valid_cuda=no
 
21184
fi
 
21185
ac_cv_lib_cuda=ac_cv_lib_cuda_main
 
21186
 
 
21187
    unset ac_cv_lib_cuda_main
 
21188
    if test "$have_valid_cuda" = "yes" ; then
 
21189
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcudart" >&5
 
21190
$as_echo_n "checking for main in -lcudart... " >&6; }
 
21191
if ${ac_cv_lib_cudart_main+:} false; then :
 
21192
  $as_echo_n "(cached) " >&6
 
21193
else
 
21194
  ac_check_lib_save_LIBS=$LIBS
 
21195
LIBS="-lcudart  $LIBS"
 
21196
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21197
/* end confdefs.h.  */
 
21198
 
 
21199
 
 
21200
int
 
21201
main ()
 
21202
{
 
21203
return main ();
 
21204
  ;
 
21205
  return 0;
 
21206
}
 
21207
_ACEOF
 
21208
if ac_fn_c_try_link "$LINENO"; then :
 
21209
  ac_cv_lib_cudart_main=yes
 
21210
else
 
21211
  ac_cv_lib_cudart_main=no
 
21212
fi
 
21213
rm -f core conftest.err conftest.$ac_objext \
 
21214
    conftest$ac_exeext conftest.$ac_ext
 
21215
LIBS=$ac_check_lib_save_LIBS
 
21216
fi
 
21217
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cudart_main" >&5
 
21218
$as_echo "$ac_cv_lib_cudart_main" >&6; }
 
21219
if test "x$ac_cv_lib_cudart_main" = xyes; then :
 
21220
  have_valid_cuda=yes
 
21221
else
 
21222
  have_valid_cuda=no
 
21223
fi
 
21224
ac_cv_lib_cudart=ac_cv_lib_cudart_main
 
21225
 
 
21226
        unset ac_cv_lib_cudart_main
 
21227
        if test "$have_valid_cuda" = yes ; then
 
21228
            STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcudart"
 
21229
            LDFLAGS="${SAVED_LDFLAGS} ${STARPU_CUDA_LDFLAGS}"
 
21230
            # we also check that CUBLAS is available
 
21231
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcublas" >&5
 
21232
$as_echo_n "checking for main in -lcublas... " >&6; }
 
21233
if ${ac_cv_lib_cublas_main+:} false; then :
 
21234
  $as_echo_n "(cached) " >&6
 
21235
else
 
21236
  ac_check_lib_save_LIBS=$LIBS
 
21237
LIBS="-lcublas  $LIBS"
 
21238
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21239
/* end confdefs.h.  */
 
21240
 
 
21241
 
 
21242
int
 
21243
main ()
 
21244
{
 
21245
return main ();
 
21246
  ;
 
21247
  return 0;
 
21248
}
 
21249
_ACEOF
 
21250
if ac_fn_c_try_link "$LINENO"; then :
 
21251
  ac_cv_lib_cublas_main=yes
 
21252
else
 
21253
  ac_cv_lib_cublas_main=no
 
21254
fi
 
21255
rm -f core conftest.err conftest.$ac_objext \
 
21256
    conftest$ac_exeext conftest.$ac_ext
 
21257
LIBS=$ac_check_lib_save_LIBS
 
21258
fi
 
21259
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cublas_main" >&5
 
21260
$as_echo "$ac_cv_lib_cublas_main" >&6; }
 
21261
if test "x$ac_cv_lib_cublas_main" = xyes; then :
 
21262
  have_valid_cuda=yes
 
21263
else
 
21264
  have_valid_cuda=no
 
21265
fi
 
21266
ac_cv_lib_cublas=ac_cv_lib_cublas_main
 
21267
 
 
21268
            unset ac_cv_lib_cublas_main
 
21269
            if test "$have_valid_cuda" = "yes" ; then
 
21270
                STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
 
21271
            fi
 
21272
        fi
 
21273
    fi
 
21274
    LDFLAGS="${SAVED_LDFLAGS}"
 
21275
 
 
21276
            fi
 
21277
        fi
 
21278
    fi
 
21279
 
 
21280
    if test "$have_valid_cuda" = "no" ; then
 
21281
        CPPFLAGS="${SAVED_CPPFLAGS}"
 
21282
        unset STARPU_CUDA_LDFLAGS
 
21283
    else
 
21284
        if test "$__cuda_include_dir" != "no"; then
 
21285
            STARPU_CUDA_CPPFLAGS="-I$__cuda_include_dir"
 
21286
            NVCCFLAGS="${NVCCFLAGS} -I$__cuda_include_dir"
 
21287
        fi
 
21288
    fi
 
21289
 
 
21290
    fi
 
21291
    if test "$have_valid_cuda" = "no" ; then
 
21292
        for f in "/usr/local/cuda" "/c/cuda" "/cygdrive/c/cuda" "/opt/cuda" "$CUDA_PATH" "$CUDA_INC_PATH/.." "$CUDA_INSTALL_PATH" "$CUDA_TOOLKIT"; do
 
21293
            if test -n "$f" ; then
 
21294
 
 
21295
    __cuda_dir="$f"
20746
21296
    __cuda_include_dir="no"
20747
21297
    __cuda_lib_dir="no"
20748
21298
 
20749
 
    if test "$__cuda_dir" != "no" -a "$__cuda_dir" != "" ; then
20750
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA RT is available in $__cuda_dir" >&5
20751
 
$as_echo_n "checking whether CUDA RT is available in $__cuda_dir... " >&6; }
 
21299
    if test -z "$__cuda_lib_dir" ; then
 
21300
        __cuda_lib_dir=no
 
21301
    fi
 
21302
    if test -z "$__cuda_include_dir" ; then
 
21303
        __cuda_include_dir=no
 
21304
    fi
 
21305
    if test -z "$__cuda_dir" ; then
 
21306
        __cuda_dir=no
 
21307
    fi
 
21308
 
 
21309
    if test "$__cuda_dir" != "no" ; then
 
21310
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available in $__cuda_dir" >&5
 
21311
$as_echo_n "checking whether CUDA is available in $__cuda_dir... " >&6; }
20752
21312
    else
20753
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA RT is available" >&5
20754
 
$as_echo_n "checking whether CUDA RT is available... " >&6; }
 
21313
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available" >&5
 
21314
$as_echo_n "checking whether CUDA is available... " >&6; }
20755
21315
    fi
20756
21316
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
20757
21317
$as_echo "" >&6; }
20759
21319
    if test "$__cuda_include_dir" = "no" -a "$__cuda_dir" != "no" ; then
20760
21320
        __cuda_include_dir="$__cuda_dir/include"
20761
21321
    fi
20762
 
    if test "$__cuda_lib_dir" = "no" -a "$__cuda_dir" != "no" ; then
20763
 
        __cuda_lib_dir="$__cuda_dir/lib"
20764
 
    fi
20765
21322
 
20766
21323
    SAVED_CPPFLAGS="$CPPFLAGS"
20767
 
    SAVED_LDFLAGS="${LDFLAGS}"
20768
 
    SAVED_STARPU_CUDA_LDFLAGS=${STARPU_CUDA_LDFLAGS}
 
21324
    have_valid_cuda=no
20769
21325
 
20770
 
    if test "$__cuda_lib_dir" != "no" ; then
20771
 
        STARPU_CUDA_LDFLAGS="${SAVED_STARPU_CUDA_LDFLAGS} -L$__cuda_lib_dir"
20772
 
    fi
20773
21326
    if test "$__cuda_include_dir" != "no" ; then
20774
21327
        CPPFLAGS="${CPPFLAGS} -I$__cuda_include_dir"
20775
21328
    fi
20785
21338
    unset ac_cv_header_cuda_h
20786
21339
 
20787
21340
    if test "$have_valid_cuda" = "yes" ; then
20788
 
        if test "$__cuda_lib_dir" != "no"; then
20789
 
            LDFLAGS="${SAVED_LDFLAGS} -L$__cuda_lib_dir"
20790
 
        fi
20791
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcudart" >&5
20792
 
$as_echo_n "checking for main in -lcudart... " >&6; }
20793
 
if ${ac_cv_lib_cudart_main+:} false; then :
20794
 
  $as_echo_n "(cached) " >&6
20795
 
else
20796
 
  ac_check_lib_save_LIBS=$LIBS
20797
 
LIBS="-lcudart  $LIBS"
20798
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20799
 
/* end confdefs.h.  */
20800
 
 
20801
 
 
20802
 
int
20803
 
main ()
20804
 
{
20805
 
return main ();
20806
 
  ;
20807
 
  return 0;
20808
 
}
20809
 
_ACEOF
20810
 
if ac_fn_c_try_link "$LINENO"; then :
20811
 
  ac_cv_lib_cudart_main=yes
20812
 
else
20813
 
  ac_cv_lib_cudart_main=no
20814
 
fi
20815
 
rm -f core conftest.err conftest.$ac_objext \
20816
 
    conftest$ac_exeext conftest.$ac_ext
20817
 
LIBS=$ac_check_lib_save_LIBS
20818
 
fi
20819
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cudart_main" >&5
20820
 
$as_echo "$ac_cv_lib_cudart_main" >&6; }
20821
 
if test "x$ac_cv_lib_cudart_main" = xyes; then :
20822
 
  have_valid_cuda=yes
20823
 
else
20824
 
  have_valid_cuda=no
20825
 
fi
20826
 
ac_cv_lib_cudart=ac_cv_lib_cudart_main
20827
 
 
20828
 
        unset ac_cv_lib_cudart_main
20829
 
        if test "$have_valid_cuda" = "no" ; then
20830
 
            if test ""no"" = "no" -a "$__cuda_dir" != "no" ; then
20831
 
                __cuda_lib_dir="$__cuda_dir/lib64"
20832
 
                LDFLAGS="${SAVED_LDFLAGS} -L$__cuda_lib_dir"
20833
 
                STARPU_CUDA_LDFLAGS="${SAVED_STARPU_CUDA_LDFLAGS} -L$__cuda_lib_dir"
20834
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcudart" >&5
20835
 
$as_echo_n "checking for main in -lcudart... " >&6; }
20836
 
if ${ac_cv_lib_cudart_main+:} false; then :
20837
 
  $as_echo_n "(cached) " >&6
20838
 
else
20839
 
  ac_check_lib_save_LIBS=$LIBS
20840
 
LIBS="-lcudart  $LIBS"
20841
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20842
 
/* end confdefs.h.  */
20843
 
 
20844
 
 
20845
 
int
20846
 
main ()
20847
 
{
20848
 
return main ();
20849
 
  ;
20850
 
  return 0;
20851
 
}
20852
 
_ACEOF
20853
 
if ac_fn_c_try_link "$LINENO"; then :
20854
 
  ac_cv_lib_cudart_main=yes
20855
 
else
20856
 
  ac_cv_lib_cudart_main=no
20857
 
fi
20858
 
rm -f core conftest.err conftest.$ac_objext \
20859
 
    conftest$ac_exeext conftest.$ac_ext
20860
 
LIBS=$ac_check_lib_save_LIBS
20861
 
fi
20862
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cudart_main" >&5
20863
 
$as_echo "$ac_cv_lib_cudart_main" >&6; }
20864
 
if test "x$ac_cv_lib_cudart_main" = xyes; then :
20865
 
  have_valid_cuda=yes
20866
 
else
20867
 
  have_valid_cuda=no
20868
 
fi
20869
 
ac_cv_lib_cudart=ac_cv_lib_cudart_main
20870
 
 
20871
 
                unset ac_cv_lib_cudart_main
20872
 
            fi
20873
 
        fi
20874
 
    fi
20875
 
 
20876
 
    if test "$have_valid_cuda" = "yes" ; then
20877
 
        STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcudart"
20878
 
        LDFLAGS="${SAVED_LDFLAGS} ${STARPU_CUDA_LDFLAGS}"
20879
 
        # we also check that CUBLAS is available
20880
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcublas" >&5
20881
 
$as_echo_n "checking for main in -lcublas... " >&6; }
20882
 
if ${ac_cv_lib_cublas_main+:} false; then :
20883
 
  $as_echo_n "(cached) " >&6
20884
 
else
20885
 
  ac_check_lib_save_LIBS=$LIBS
20886
 
LIBS="-lcublas  $LIBS"
20887
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20888
 
/* end confdefs.h.  */
20889
 
 
20890
 
 
20891
 
int
20892
 
main ()
20893
 
{
20894
 
return main ();
20895
 
  ;
20896
 
  return 0;
20897
 
}
20898
 
_ACEOF
20899
 
if ac_fn_c_try_link "$LINENO"; then :
20900
 
  ac_cv_lib_cublas_main=yes
20901
 
else
20902
 
  ac_cv_lib_cublas_main=no
20903
 
fi
20904
 
rm -f core conftest.err conftest.$ac_objext \
20905
 
    conftest$ac_exeext conftest.$ac_ext
20906
 
LIBS=$ac_check_lib_save_LIBS
20907
 
fi
20908
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cublas_main" >&5
20909
 
$as_echo "$ac_cv_lib_cublas_main" >&6; }
20910
 
if test "x$ac_cv_lib_cublas_main" = xyes; then :
20911
 
  have_valid_cuda=yes
20912
 
else
20913
 
  have_valid_cuda=no
20914
 
fi
20915
 
ac_cv_lib_cublas=ac_cv_lib_cublas_main
20916
 
 
20917
 
        unset ac_cv_lib_cublas_main
20918
 
        if test "$have_valid_cuda" = "yes" ; then
20919
 
            STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
20920
 
        fi
20921
 
    fi
20922
 
 
20923
 
    CPPFLAGS="${SAVED_CPPFLAGS}"
20924
 
    LDFLAGS="${SAVED_LDFLAGS}"
20925
 
 
20926
 
    if test "$have_valid_cuda" = "yes" -a "$__cuda_include_dir" != "no"; then
20927
 
        STARPU_CUDA_CPPFLAGS="-I$__cuda_include_dir"
20928
 
        NVCCFLAGS="${NVCCFLAGS} -I$__cuda_include_dir"
20929
 
    fi
20930
 
 
20931
 
                if test "$have_valid_cuda" = "yes" ; then
20932
 
                    break
20933
 
                fi
20934
 
            done
20935
 
        fi
 
21341
        if test "$__cuda_lib_dir" != "no" ; then
 
21342
 
 
21343
    __cuda_L="-L${__cuda_lib_dir}"
 
21344
    SAVED_LDFLAGS="${LDFLAGS}"
 
21345
    STARPU_CUDA_LDFLAGS="${__cuda_L}"
 
21346
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available with: $__cuda_L" >&5
 
21347
$as_echo_n "checking whether CUDA is available with: $__cuda_L... " >&6; }
 
21348
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
21349
$as_echo "" >&6; }
 
21350
    LDFLAGS="${SAVED_LDFLAGS} ${__cuda_L}"
 
21351
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcuda" >&5
 
21352
$as_echo_n "checking for main in -lcuda... " >&6; }
 
21353
if ${ac_cv_lib_cuda_main+:} false; then :
 
21354
  $as_echo_n "(cached) " >&6
 
21355
else
 
21356
  ac_check_lib_save_LIBS=$LIBS
 
21357
LIBS="-lcuda  $LIBS"
 
21358
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21359
/* end confdefs.h.  */
 
21360
 
 
21361
 
 
21362
int
 
21363
main ()
 
21364
{
 
21365
return main ();
 
21366
  ;
 
21367
  return 0;
 
21368
}
 
21369
_ACEOF
 
21370
if ac_fn_c_try_link "$LINENO"; then :
 
21371
  ac_cv_lib_cuda_main=yes
 
21372
else
 
21373
  ac_cv_lib_cuda_main=no
 
21374
fi
 
21375
rm -f core conftest.err conftest.$ac_objext \
 
21376
    conftest$ac_exeext conftest.$ac_ext
 
21377
LIBS=$ac_check_lib_save_LIBS
 
21378
fi
 
21379
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cuda_main" >&5
 
21380
$as_echo "$ac_cv_lib_cuda_main" >&6; }
 
21381
if test "x$ac_cv_lib_cuda_main" = xyes; then :
 
21382
  have_valid_cuda=yes
 
21383
else
 
21384
  have_valid_cuda=no
 
21385
fi
 
21386
ac_cv_lib_cuda=ac_cv_lib_cuda_main
 
21387
 
 
21388
    unset ac_cv_lib_cuda_main
 
21389
    if test "$have_valid_cuda" = "yes" ; then
 
21390
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcudart" >&5
 
21391
$as_echo_n "checking for main in -lcudart... " >&6; }
 
21392
if ${ac_cv_lib_cudart_main+:} false; then :
 
21393
  $as_echo_n "(cached) " >&6
 
21394
else
 
21395
  ac_check_lib_save_LIBS=$LIBS
 
21396
LIBS="-lcudart  $LIBS"
 
21397
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21398
/* end confdefs.h.  */
 
21399
 
 
21400
 
 
21401
int
 
21402
main ()
 
21403
{
 
21404
return main ();
 
21405
  ;
 
21406
  return 0;
 
21407
}
 
21408
_ACEOF
 
21409
if ac_fn_c_try_link "$LINENO"; then :
 
21410
  ac_cv_lib_cudart_main=yes
 
21411
else
 
21412
  ac_cv_lib_cudart_main=no
 
21413
fi
 
21414
rm -f core conftest.err conftest.$ac_objext \
 
21415
    conftest$ac_exeext conftest.$ac_ext
 
21416
LIBS=$ac_check_lib_save_LIBS
 
21417
fi
 
21418
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cudart_main" >&5
 
21419
$as_echo "$ac_cv_lib_cudart_main" >&6; }
 
21420
if test "x$ac_cv_lib_cudart_main" = xyes; then :
 
21421
  have_valid_cuda=yes
 
21422
else
 
21423
  have_valid_cuda=no
 
21424
fi
 
21425
ac_cv_lib_cudart=ac_cv_lib_cudart_main
 
21426
 
 
21427
        unset ac_cv_lib_cudart_main
 
21428
        if test "$have_valid_cuda" = yes ; then
 
21429
            STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcudart"
 
21430
            LDFLAGS="${SAVED_LDFLAGS} ${STARPU_CUDA_LDFLAGS}"
 
21431
            # we also check that CUBLAS is available
 
21432
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcublas" >&5
 
21433
$as_echo_n "checking for main in -lcublas... " >&6; }
 
21434
if ${ac_cv_lib_cublas_main+:} false; then :
 
21435
  $as_echo_n "(cached) " >&6
 
21436
else
 
21437
  ac_check_lib_save_LIBS=$LIBS
 
21438
LIBS="-lcublas  $LIBS"
 
21439
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21440
/* end confdefs.h.  */
 
21441
 
 
21442
 
 
21443
int
 
21444
main ()
 
21445
{
 
21446
return main ();
 
21447
  ;
 
21448
  return 0;
 
21449
}
 
21450
_ACEOF
 
21451
if ac_fn_c_try_link "$LINENO"; then :
 
21452
  ac_cv_lib_cublas_main=yes
 
21453
else
 
21454
  ac_cv_lib_cublas_main=no
 
21455
fi
 
21456
rm -f core conftest.err conftest.$ac_objext \
 
21457
    conftest$ac_exeext conftest.$ac_ext
 
21458
LIBS=$ac_check_lib_save_LIBS
 
21459
fi
 
21460
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cublas_main" >&5
 
21461
$as_echo "$ac_cv_lib_cublas_main" >&6; }
 
21462
if test "x$ac_cv_lib_cublas_main" = xyes; then :
 
21463
  have_valid_cuda=yes
 
21464
else
 
21465
  have_valid_cuda=no
 
21466
fi
 
21467
ac_cv_lib_cublas=ac_cv_lib_cublas_main
 
21468
 
 
21469
            unset ac_cv_lib_cublas_main
 
21470
            if test "$have_valid_cuda" = "yes" ; then
 
21471
                STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
 
21472
            fi
 
21473
        fi
 
21474
    fi
 
21475
    LDFLAGS="${SAVED_LDFLAGS}"
 
21476
 
 
21477
        else
 
21478
            if test "$__cuda_dir" != "no" ; then
 
21479
                for __cuda_libdir in lib64 lib lib/x64 lib/Win32 ; do
 
21480
 
 
21481
    __cuda_L="-L${__cuda_dir}/${__cuda_libdir}"
 
21482
    SAVED_LDFLAGS="${LDFLAGS}"
 
21483
    STARPU_CUDA_LDFLAGS="${__cuda_L}"
 
21484
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available with: $__cuda_L" >&5
 
21485
$as_echo_n "checking whether CUDA is available with: $__cuda_L... " >&6; }
 
21486
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
21487
$as_echo "" >&6; }
 
21488
    LDFLAGS="${SAVED_LDFLAGS} ${__cuda_L}"
 
21489
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcuda" >&5
 
21490
$as_echo_n "checking for main in -lcuda... " >&6; }
 
21491
if ${ac_cv_lib_cuda_main+:} false; then :
 
21492
  $as_echo_n "(cached) " >&6
 
21493
else
 
21494
  ac_check_lib_save_LIBS=$LIBS
 
21495
LIBS="-lcuda  $LIBS"
 
21496
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21497
/* end confdefs.h.  */
 
21498
 
 
21499
 
 
21500
int
 
21501
main ()
 
21502
{
 
21503
return main ();
 
21504
  ;
 
21505
  return 0;
 
21506
}
 
21507
_ACEOF
 
21508
if ac_fn_c_try_link "$LINENO"; then :
 
21509
  ac_cv_lib_cuda_main=yes
 
21510
else
 
21511
  ac_cv_lib_cuda_main=no
 
21512
fi
 
21513
rm -f core conftest.err conftest.$ac_objext \
 
21514
    conftest$ac_exeext conftest.$ac_ext
 
21515
LIBS=$ac_check_lib_save_LIBS
 
21516
fi
 
21517
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cuda_main" >&5
 
21518
$as_echo "$ac_cv_lib_cuda_main" >&6; }
 
21519
if test "x$ac_cv_lib_cuda_main" = xyes; then :
 
21520
  have_valid_cuda=yes
 
21521
else
 
21522
  have_valid_cuda=no
 
21523
fi
 
21524
ac_cv_lib_cuda=ac_cv_lib_cuda_main
 
21525
 
 
21526
    unset ac_cv_lib_cuda_main
 
21527
    if test "$have_valid_cuda" = "yes" ; then
 
21528
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcudart" >&5
 
21529
$as_echo_n "checking for main in -lcudart... " >&6; }
 
21530
if ${ac_cv_lib_cudart_main+:} false; then :
 
21531
  $as_echo_n "(cached) " >&6
 
21532
else
 
21533
  ac_check_lib_save_LIBS=$LIBS
 
21534
LIBS="-lcudart  $LIBS"
 
21535
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21536
/* end confdefs.h.  */
 
21537
 
 
21538
 
 
21539
int
 
21540
main ()
 
21541
{
 
21542
return main ();
 
21543
  ;
 
21544
  return 0;
 
21545
}
 
21546
_ACEOF
 
21547
if ac_fn_c_try_link "$LINENO"; then :
 
21548
  ac_cv_lib_cudart_main=yes
 
21549
else
 
21550
  ac_cv_lib_cudart_main=no
 
21551
fi
 
21552
rm -f core conftest.err conftest.$ac_objext \
 
21553
    conftest$ac_exeext conftest.$ac_ext
 
21554
LIBS=$ac_check_lib_save_LIBS
 
21555
fi
 
21556
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cudart_main" >&5
 
21557
$as_echo "$ac_cv_lib_cudart_main" >&6; }
 
21558
if test "x$ac_cv_lib_cudart_main" = xyes; then :
 
21559
  have_valid_cuda=yes
 
21560
else
 
21561
  have_valid_cuda=no
 
21562
fi
 
21563
ac_cv_lib_cudart=ac_cv_lib_cudart_main
 
21564
 
 
21565
        unset ac_cv_lib_cudart_main
 
21566
        if test "$have_valid_cuda" = yes ; then
 
21567
            STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcudart"
 
21568
            LDFLAGS="${SAVED_LDFLAGS} ${STARPU_CUDA_LDFLAGS}"
 
21569
            # we also check that CUBLAS is available
 
21570
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcublas" >&5
 
21571
$as_echo_n "checking for main in -lcublas... " >&6; }
 
21572
if ${ac_cv_lib_cublas_main+:} false; then :
 
21573
  $as_echo_n "(cached) " >&6
 
21574
else
 
21575
  ac_check_lib_save_LIBS=$LIBS
 
21576
LIBS="-lcublas  $LIBS"
 
21577
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21578
/* end confdefs.h.  */
 
21579
 
 
21580
 
 
21581
int
 
21582
main ()
 
21583
{
 
21584
return main ();
 
21585
  ;
 
21586
  return 0;
 
21587
}
 
21588
_ACEOF
 
21589
if ac_fn_c_try_link "$LINENO"; then :
 
21590
  ac_cv_lib_cublas_main=yes
 
21591
else
 
21592
  ac_cv_lib_cublas_main=no
 
21593
fi
 
21594
rm -f core conftest.err conftest.$ac_objext \
 
21595
    conftest$ac_exeext conftest.$ac_ext
 
21596
LIBS=$ac_check_lib_save_LIBS
 
21597
fi
 
21598
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cublas_main" >&5
 
21599
$as_echo "$ac_cv_lib_cublas_main" >&6; }
 
21600
if test "x$ac_cv_lib_cublas_main" = xyes; then :
 
21601
  have_valid_cuda=yes
 
21602
else
 
21603
  have_valid_cuda=no
 
21604
fi
 
21605
ac_cv_lib_cublas=ac_cv_lib_cublas_main
 
21606
 
 
21607
            unset ac_cv_lib_cublas_main
 
21608
            if test "$have_valid_cuda" = "yes" ; then
 
21609
                STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
 
21610
            fi
 
21611
        fi
 
21612
    fi
 
21613
    LDFLAGS="${SAVED_LDFLAGS}"
 
21614
 
 
21615
                    if test "$have_valid_cuda" = yes ; then
 
21616
                        break
 
21617
                    fi
 
21618
                done
 
21619
            else
 
21620
 
 
21621
    __cuda_L=""
 
21622
    SAVED_LDFLAGS="${LDFLAGS}"
 
21623
    STARPU_CUDA_LDFLAGS="${__cuda_L}"
 
21624
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available with: $__cuda_L" >&5
 
21625
$as_echo_n "checking whether CUDA is available with: $__cuda_L... " >&6; }
 
21626
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
21627
$as_echo "" >&6; }
 
21628
    LDFLAGS="${SAVED_LDFLAGS} ${__cuda_L}"
 
21629
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcuda" >&5
 
21630
$as_echo_n "checking for main in -lcuda... " >&6; }
 
21631
if ${ac_cv_lib_cuda_main+:} false; then :
 
21632
  $as_echo_n "(cached) " >&6
 
21633
else
 
21634
  ac_check_lib_save_LIBS=$LIBS
 
21635
LIBS="-lcuda  $LIBS"
 
21636
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21637
/* end confdefs.h.  */
 
21638
 
 
21639
 
 
21640
int
 
21641
main ()
 
21642
{
 
21643
return main ();
 
21644
  ;
 
21645
  return 0;
 
21646
}
 
21647
_ACEOF
 
21648
if ac_fn_c_try_link "$LINENO"; then :
 
21649
  ac_cv_lib_cuda_main=yes
 
21650
else
 
21651
  ac_cv_lib_cuda_main=no
 
21652
fi
 
21653
rm -f core conftest.err conftest.$ac_objext \
 
21654
    conftest$ac_exeext conftest.$ac_ext
 
21655
LIBS=$ac_check_lib_save_LIBS
 
21656
fi
 
21657
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cuda_main" >&5
 
21658
$as_echo "$ac_cv_lib_cuda_main" >&6; }
 
21659
if test "x$ac_cv_lib_cuda_main" = xyes; then :
 
21660
  have_valid_cuda=yes
 
21661
else
 
21662
  have_valid_cuda=no
 
21663
fi
 
21664
ac_cv_lib_cuda=ac_cv_lib_cuda_main
 
21665
 
 
21666
    unset ac_cv_lib_cuda_main
 
21667
    if test "$have_valid_cuda" = "yes" ; then
 
21668
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcudart" >&5
 
21669
$as_echo_n "checking for main in -lcudart... " >&6; }
 
21670
if ${ac_cv_lib_cudart_main+:} false; then :
 
21671
  $as_echo_n "(cached) " >&6
 
21672
else
 
21673
  ac_check_lib_save_LIBS=$LIBS
 
21674
LIBS="-lcudart  $LIBS"
 
21675
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21676
/* end confdefs.h.  */
 
21677
 
 
21678
 
 
21679
int
 
21680
main ()
 
21681
{
 
21682
return main ();
 
21683
  ;
 
21684
  return 0;
 
21685
}
 
21686
_ACEOF
 
21687
if ac_fn_c_try_link "$LINENO"; then :
 
21688
  ac_cv_lib_cudart_main=yes
 
21689
else
 
21690
  ac_cv_lib_cudart_main=no
 
21691
fi
 
21692
rm -f core conftest.err conftest.$ac_objext \
 
21693
    conftest$ac_exeext conftest.$ac_ext
 
21694
LIBS=$ac_check_lib_save_LIBS
 
21695
fi
 
21696
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cudart_main" >&5
 
21697
$as_echo "$ac_cv_lib_cudart_main" >&6; }
 
21698
if test "x$ac_cv_lib_cudart_main" = xyes; then :
 
21699
  have_valid_cuda=yes
 
21700
else
 
21701
  have_valid_cuda=no
 
21702
fi
 
21703
ac_cv_lib_cudart=ac_cv_lib_cudart_main
 
21704
 
 
21705
        unset ac_cv_lib_cudart_main
 
21706
        if test "$have_valid_cuda" = yes ; then
 
21707
            STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcudart"
 
21708
            LDFLAGS="${SAVED_LDFLAGS} ${STARPU_CUDA_LDFLAGS}"
 
21709
            # we also check that CUBLAS is available
 
21710
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcublas" >&5
 
21711
$as_echo_n "checking for main in -lcublas... " >&6; }
 
21712
if ${ac_cv_lib_cublas_main+:} false; then :
 
21713
  $as_echo_n "(cached) " >&6
 
21714
else
 
21715
  ac_check_lib_save_LIBS=$LIBS
 
21716
LIBS="-lcublas  $LIBS"
 
21717
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21718
/* end confdefs.h.  */
 
21719
 
 
21720
 
 
21721
int
 
21722
main ()
 
21723
{
 
21724
return main ();
 
21725
  ;
 
21726
  return 0;
 
21727
}
 
21728
_ACEOF
 
21729
if ac_fn_c_try_link "$LINENO"; then :
 
21730
  ac_cv_lib_cublas_main=yes
 
21731
else
 
21732
  ac_cv_lib_cublas_main=no
 
21733
fi
 
21734
rm -f core conftest.err conftest.$ac_objext \
 
21735
    conftest$ac_exeext conftest.$ac_ext
 
21736
LIBS=$ac_check_lib_save_LIBS
 
21737
fi
 
21738
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cublas_main" >&5
 
21739
$as_echo "$ac_cv_lib_cublas_main" >&6; }
 
21740
if test "x$ac_cv_lib_cublas_main" = xyes; then :
 
21741
  have_valid_cuda=yes
 
21742
else
 
21743
  have_valid_cuda=no
 
21744
fi
 
21745
ac_cv_lib_cublas=ac_cv_lib_cublas_main
 
21746
 
 
21747
            unset ac_cv_lib_cublas_main
 
21748
            if test "$have_valid_cuda" = "yes" ; then
 
21749
                STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
 
21750
            fi
 
21751
        fi
 
21752
    fi
 
21753
    LDFLAGS="${SAVED_LDFLAGS}"
 
21754
 
 
21755
            fi
 
21756
        fi
 
21757
    fi
 
21758
 
 
21759
    if test "$have_valid_cuda" = "no" ; then
 
21760
        CPPFLAGS="${SAVED_CPPFLAGS}"
 
21761
        unset STARPU_CUDA_LDFLAGS
 
21762
    else
 
21763
        if test "$__cuda_include_dir" != "no"; then
 
21764
            STARPU_CUDA_CPPFLAGS="-I$__cuda_include_dir"
 
21765
            NVCCFLAGS="${NVCCFLAGS} -I$__cuda_include_dir"
 
21766
        fi
 
21767
    fi
 
21768
 
 
21769
                if test "$have_valid_cuda" = "yes" ; then
 
21770
                    break
 
21771
                fi
 
21772
            fi
 
21773
        done
20936
21774
    fi
20937
21775
 
20938
21776
    # Check cuda is compatible with the C compiler
20941
21779
    if test "$have_valid_cuda" = "yes" ; then
20942
21780
        SAVED_CPPFLAGS="${CPPFLAGS}"
20943
21781
        CPPFLAGS="${CPPFLAGS} ${STARPU_CUDA_CPPFLAGS}"
 
21782
        SAVED_LDFLAGS="${LDFLAGS}"
 
21783
        LDFLAGS="${LDFLAGS} ${STARPU_CUDA_LDFLAGS} -lcuda"
20944
21784
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20945
21785
/* end confdefs.h.  */
20946
21786
#include <cuda.h>
20951
21791
 
20952
21792
  ;
20953
21793
  return 0;
20954
 
},
20955
 
            have_valid_cuda="yes",
 
21794
}
 
21795
_ACEOF
 
21796
if ac_fn_c_try_compile "$LINENO"; then :
 
21797
 
 
21798
              if test "$cross_compiling" = yes; then :
 
21799
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 
21800
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
 
21801
as_fn_error $? "cannot run test program while cross compiling
 
21802
See \`config.log' for more details" "$LINENO" 5; }
 
21803
else
 
21804
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
21805
/* end confdefs.h.  */
 
21806
#include <cuda.h>
 
21807
int
 
21808
main ()
 
21809
{
 
21810
 
 
21811
 
 
21812
  ;
 
21813
  return 0;
 
21814
}
 
21815
_ACEOF
 
21816
if ac_fn_c_try_run "$LINENO"; then :
 
21817
  have_valid_cuda="yes"
 
21818
else
 
21819
 
 
21820
                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: CUDA found and can be compiled, but compiled application can not be run, is the CUDA path missing in LD_LIBRARY_PATH?" >&5
 
21821
$as_echo "CUDA found and can be compiled, but compiled application can not be run, is the CUDA path missing in LD_LIBRARY_PATH?" >&6; }
 
21822
                  have_valid_cuda="no"
 
21823
 
 
21824
fi
 
21825
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
 
21826
  conftest.$ac_objext conftest.beam conftest.$ac_ext
 
21827
fi
 
21828
 
 
21829
 
 
21830
else
 
21831
 
 
21832
            as_fn_error $? "CUDA found, but cuda.h could not be compiled" "$LINENO" 5
20956
21833
            have_valid_cuda="no"
20957
21834
 
20958
 
_ACEOF
20959
 
if ac_fn_c_try_compile "$LINENO"; then :
20960
21835
 
20961
21836
fi
20962
21837
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20963
21838
        CPPFLAGS="${SAVED_CPPFLAGS}"
 
21839
        LDFLAGS="${SAVED_LDFLAGS}"
20964
21840
    fi
20965
21841
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_valid_cuda" >&5
20966
21842
$as_echo "$have_valid_cuda" >&6; }
20993
21869
  IFS=$as_save_IFS
20994
21870
  test -z "$as_dir" && as_dir=.
20995
21871
    for ac_exec_ext in '' $ac_executable_extensions; do
20996
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
21872
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20997
21873
    ac_cv_path_NVCC="$as_dir/$ac_word$ac_exec_ext"
20998
21874
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20999
21875
    break 2
21086
21962
  IFS=$as_save_IFS
21087
21963
  test -z "$as_dir" && as_dir=.
21088
21964
    for ac_exec_ext in '' $ac_executable_extensions; do
21089
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
21965
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21090
21966
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
21091
21967
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21092
21968
    break 2
21129
22005
  IFS=$as_save_IFS
21130
22006
  test -z "$as_dir" && as_dir=.
21131
22007
    for ac_exec_ext in '' $ac_executable_extensions; do
21132
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
22008
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21133
22009
    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
21134
22010
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21135
22011
    break 2
21466
22342
 
21467
22343
        if test "x$has_opencl_being_checked" != "xyes" ; then
21468
22344
 
21469
 
    __opencl_dir=$opencl_dir
21470
 
    __opencl_include_dir=$opencl_include_dir
21471
 
    __opencl_lib_dir=$opencl_lib_dir
 
22345
    __opencl_dir="$opencl_dir"
 
22346
    __opencl_include_dir="$opencl_include_dir"
 
22347
    __opencl_lib_dir="$opencl_lib_dir"
21472
22348
 
21473
22349
    if test "$__opencl_dir" != "no" ; then
21474
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir" >&5
21475
 
$as_echo_n "checking whether OpenCL is available in $__opencl_dir... " >&6; }
 
22350
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir $__opencl_include_dir and $__opencl_lib_dir" >&5
 
22351
$as_echo_n "checking whether OpenCL is available in $__opencl_dir $__opencl_include_dir and $__opencl_lib_dir... " >&6; }
21476
22352
    else
21477
22353
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available" >&5
21478
22354
$as_echo_n "checking whether OpenCL is available... " >&6; }
21483
22359
    if test "$__opencl_include_dir" = "no" -a "$__opencl_dir" != "no" ; then
21484
22360
        __opencl_include_dir="$__opencl_dir/include"
21485
22361
    fi
21486
 
    if test "$__opencl_lib_dir" = "no" -a "$__opencl_dir" != "no" ; then
21487
 
        __opencl_lib_dir="$__opencl_dir/lib"
21488
 
    fi
21489
22362
 
21490
22363
    SAVED_CPPFLAGS="$CPPFLAGS"
21491
22364
    SAVED_LDFLAGS="${LDFLAGS}"
21506
22379
    if test "$have_valid_opencl" = "yes" ; then
21507
22380
        if test "$__opencl_lib_dir" != "no"; then
21508
22381
            LDFLAGS="${SAVED_LDFLAGS} -L$__opencl_lib_dir"
21509
 
        fi
21510
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
21511
 
$as_echo_n "checking for main in -lOpenCL... " >&6; }
21512
 
if ${ac_cv_lib_OpenCL_main+:} false; then :
21513
 
  $as_echo_n "(cached) " >&6
21514
 
else
21515
 
  ac_check_lib_save_LIBS=$LIBS
21516
 
LIBS="-lOpenCL  $LIBS"
21517
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21518
 
/* end confdefs.h.  */
21519
 
 
21520
 
 
21521
 
int
21522
 
main ()
21523
 
{
21524
 
return main ();
21525
 
  ;
21526
 
  return 0;
21527
 
}
21528
 
_ACEOF
21529
 
if ac_fn_c_try_link "$LINENO"; then :
21530
 
  ac_cv_lib_OpenCL_main=yes
21531
 
else
21532
 
  ac_cv_lib_OpenCL_main=no
21533
 
fi
21534
 
rm -f core conftest.err conftest.$ac_objext \
21535
 
    conftest$ac_exeext conftest.$ac_ext
21536
 
LIBS=$ac_check_lib_save_LIBS
21537
 
fi
21538
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
21539
 
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
21540
 
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
21541
 
  have_valid_opencl=yes
21542
 
else
21543
 
  have_valid_opencl=no
21544
 
fi
21545
 
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
21546
 
 
21547
 
        unset ac_cv_lib_OpenCL_main
21548
 
        if test "$have_valid_opencl" = "no" ; then
21549
 
            if test "$opencl_lib_dir" = "no" -a "$__opencl_dir" != "no" ; then
21550
 
                __opencl_lib_dir="$__opencl_dir/lib64"
21551
 
                LDFLAGS="${SAVED_LDFLAGS} -L$__opencl_lib_dir"
21552
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
21553
 
$as_echo_n "checking for main in -lOpenCL... " >&6; }
21554
 
if ${ac_cv_lib_OpenCL_main+:} false; then :
21555
 
  $as_echo_n "(cached) " >&6
21556
 
else
21557
 
  ac_check_lib_save_LIBS=$LIBS
21558
 
LIBS="-lOpenCL  $LIBS"
21559
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21560
 
/* end confdefs.h.  */
21561
 
 
21562
 
 
21563
 
int
21564
 
main ()
21565
 
{
21566
 
return main ();
21567
 
  ;
21568
 
  return 0;
21569
 
}
21570
 
_ACEOF
21571
 
if ac_fn_c_try_link "$LINENO"; then :
21572
 
  ac_cv_lib_OpenCL_main=yes
21573
 
else
21574
 
  ac_cv_lib_OpenCL_main=no
21575
 
fi
21576
 
rm -f core conftest.err conftest.$ac_objext \
21577
 
    conftest$ac_exeext conftest.$ac_ext
21578
 
LIBS=$ac_check_lib_save_LIBS
21579
 
fi
21580
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
21581
 
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
21582
 
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
21583
 
  have_valid_opencl=yes
21584
 
else
21585
 
  have_valid_opencl=no
21586
 
fi
21587
 
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
21588
 
 
21589
 
                unset ac_cv_lib_OpenCL_main
21590
 
            fi
 
22382
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
22383
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
22384
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
22385
  $as_echo_n "(cached) " >&6
 
22386
else
 
22387
  ac_check_lib_save_LIBS=$LIBS
 
22388
LIBS="-lOpenCL  $LIBS"
 
22389
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
22390
/* end confdefs.h.  */
 
22391
 
 
22392
 
 
22393
int
 
22394
main ()
 
22395
{
 
22396
return main ();
 
22397
  ;
 
22398
  return 0;
 
22399
}
 
22400
_ACEOF
 
22401
if ac_fn_c_try_link "$LINENO"; then :
 
22402
  ac_cv_lib_OpenCL_main=yes
 
22403
else
 
22404
  ac_cv_lib_OpenCL_main=no
 
22405
fi
 
22406
rm -f core conftest.err conftest.$ac_objext \
 
22407
    conftest$ac_exeext conftest.$ac_ext
 
22408
LIBS=$ac_check_lib_save_LIBS
 
22409
fi
 
22410
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
22411
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
22412
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
22413
  have_valid_opencl=yes
 
22414
else
 
22415
  have_valid_opencl=no
 
22416
fi
 
22417
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
22418
 
 
22419
            unset ac_cv_lib_OpenCL_main
 
22420
        else
 
22421
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir" >&5
 
22422
$as_echo_n "checking whether OpenCL is available in $__opencl_dir... " >&6; }
 
22423
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
22424
$as_echo "" >&6; }
 
22425
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
22426
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
22427
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
22428
  $as_echo_n "(cached) " >&6
 
22429
else
 
22430
  ac_check_lib_save_LIBS=$LIBS
 
22431
LIBS="-lOpenCL  $LIBS"
 
22432
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
22433
/* end confdefs.h.  */
 
22434
 
 
22435
 
 
22436
int
 
22437
main ()
 
22438
{
 
22439
return main ();
 
22440
  ;
 
22441
  return 0;
 
22442
}
 
22443
_ACEOF
 
22444
if ac_fn_c_try_link "$LINENO"; then :
 
22445
  ac_cv_lib_OpenCL_main=yes
 
22446
else
 
22447
  ac_cv_lib_OpenCL_main=no
 
22448
fi
 
22449
rm -f core conftest.err conftest.$ac_objext \
 
22450
    conftest$ac_exeext conftest.$ac_ext
 
22451
LIBS=$ac_check_lib_save_LIBS
 
22452
fi
 
22453
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
22454
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
22455
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
22456
  have_valid_opencl=yes
 
22457
else
 
22458
  have_valid_opencl=no
 
22459
fi
 
22460
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
22461
 
 
22462
            unset ac_cv_lib_OpenCL_main
 
22463
            if test "$have_valid_opencl" = "no" -a "$__opencl_dir" != "no" ; then
 
22464
                for __cuda_libdir in lib64 lib lib/x86 lib/Win32 ; do
 
22465
                    __opencl_lib_dir="$__opencl_dir/$__cuda_libdir"
 
22466
                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir and $__opencl_lib_dir" >&5
 
22467
$as_echo_n "checking whether OpenCL is available in $__opencl_dir and $__opencl_lib_dir... " >&6; }
 
22468
                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
22469
$as_echo "" >&6; }
 
22470
                    LDFLAGS="${SAVED_LDFLAGS} -L$__opencl_lib_dir"
 
22471
                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
22472
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
22473
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
22474
  $as_echo_n "(cached) " >&6
 
22475
else
 
22476
  ac_check_lib_save_LIBS=$LIBS
 
22477
LIBS="-lOpenCL  $LIBS"
 
22478
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
22479
/* end confdefs.h.  */
 
22480
 
 
22481
 
 
22482
int
 
22483
main ()
 
22484
{
 
22485
return main ();
 
22486
  ;
 
22487
  return 0;
 
22488
}
 
22489
_ACEOF
 
22490
if ac_fn_c_try_link "$LINENO"; then :
 
22491
  ac_cv_lib_OpenCL_main=yes
 
22492
else
 
22493
  ac_cv_lib_OpenCL_main=no
 
22494
fi
 
22495
rm -f core conftest.err conftest.$ac_objext \
 
22496
    conftest$ac_exeext conftest.$ac_ext
 
22497
LIBS=$ac_check_lib_save_LIBS
 
22498
fi
 
22499
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
22500
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
22501
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
22502
  have_valid_opencl=yes
 
22503
else
 
22504
  have_valid_opencl=no
 
22505
fi
 
22506
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
22507
 
 
22508
                    unset ac_cv_lib_OpenCL_main
 
22509
                    if test "$have_valid_opencl" = yes ; then
 
22510
                        break
 
22511
                    fi
 
22512
                done
 
22513
            else
 
22514
                LDFLAGS="${SAVED_LDFLAGS}"
 
22515
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
22516
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
22517
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
22518
  $as_echo_n "(cached) " >&6
 
22519
else
 
22520
  ac_check_lib_save_LIBS=$LIBS
 
22521
LIBS="-lOpenCL  $LIBS"
 
22522
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
22523
/* end confdefs.h.  */
 
22524
 
 
22525
 
 
22526
int
 
22527
main ()
 
22528
{
 
22529
return main ();
 
22530
  ;
 
22531
  return 0;
 
22532
}
 
22533
_ACEOF
 
22534
if ac_fn_c_try_link "$LINENO"; then :
 
22535
  ac_cv_lib_OpenCL_main=yes
 
22536
else
 
22537
  ac_cv_lib_OpenCL_main=no
 
22538
fi
 
22539
rm -f core conftest.err conftest.$ac_objext \
 
22540
    conftest$ac_exeext conftest.$ac_ext
 
22541
LIBS=$ac_check_lib_save_LIBS
 
22542
fi
 
22543
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
22544
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
22545
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
22546
  have_valid_opencl=yes
 
22547
else
 
22548
  have_valid_opencl=no
 
22549
fi
 
22550
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
22551
 
 
22552
                unset ac_cv_lib_OpenCL_main
 
22553
            fi
21591
22554
        fi
21592
22555
    fi
21593
22556
 
21619
22582
 
21620
22583
 
21621
22584
            if test "$have_valid_opencl" = "no" ; then
21622
 
                for f in "/usr/local/cuda" "/c/cuda" "/cygdrive/c/cuda" "/opt/cuda" "$CUDA_INC_PATH/.." "$CUDA_INSTALL_PATH" "$CUDA_TOOLKIT"; do
21623
 
                    if test -n $f ; then
 
22585
                for f in "/usr/local/cuda" "/c/cuda" "/cygdrive/c/cuda" "/opt/cuda" "$CUDA_PATH" "$CUDA_INC_PATH/.." "$CUDA_INSTALL_PATH" "$CUDA_TOOLKIT"; do
 
22586
                    if test -n "$f" ; then
21624
22587
 
21625
 
    __opencl_dir=$f
 
22588
    __opencl_dir="$f"
21626
22589
    __opencl_include_dir="no"
21627
22590
    __opencl_lib_dir="no"
21628
22591
 
21629
22592
    if test "$__opencl_dir" != "no" ; then
21630
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir" >&5
21631
 
$as_echo_n "checking whether OpenCL is available in $__opencl_dir... " >&6; }
 
22593
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir $__opencl_include_dir and $__opencl_lib_dir" >&5
 
22594
$as_echo_n "checking whether OpenCL is available in $__opencl_dir $__opencl_include_dir and $__opencl_lib_dir... " >&6; }
21632
22595
    else
21633
22596
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available" >&5
21634
22597
$as_echo_n "checking whether OpenCL is available... " >&6; }
21639
22602
    if test "$__opencl_include_dir" = "no" -a "$__opencl_dir" != "no" ; then
21640
22603
        __opencl_include_dir="$__opencl_dir/include"
21641
22604
    fi
21642
 
    if test "$__opencl_lib_dir" = "no" -a "$__opencl_dir" != "no" ; then
21643
 
        __opencl_lib_dir="$__opencl_dir/lib"
21644
 
    fi
21645
22605
 
21646
22606
    SAVED_CPPFLAGS="$CPPFLAGS"
21647
22607
    SAVED_LDFLAGS="${LDFLAGS}"
21662
22622
    if test "$have_valid_opencl" = "yes" ; then
21663
22623
        if test "$__opencl_lib_dir" != "no"; then
21664
22624
            LDFLAGS="${SAVED_LDFLAGS} -L$__opencl_lib_dir"
21665
 
        fi
21666
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
21667
 
$as_echo_n "checking for main in -lOpenCL... " >&6; }
21668
 
if ${ac_cv_lib_OpenCL_main+:} false; then :
21669
 
  $as_echo_n "(cached) " >&6
21670
 
else
21671
 
  ac_check_lib_save_LIBS=$LIBS
21672
 
LIBS="-lOpenCL  $LIBS"
21673
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21674
 
/* end confdefs.h.  */
21675
 
 
21676
 
 
21677
 
int
21678
 
main ()
21679
 
{
21680
 
return main ();
21681
 
  ;
21682
 
  return 0;
21683
 
}
21684
 
_ACEOF
21685
 
if ac_fn_c_try_link "$LINENO"; then :
21686
 
  ac_cv_lib_OpenCL_main=yes
21687
 
else
21688
 
  ac_cv_lib_OpenCL_main=no
21689
 
fi
21690
 
rm -f core conftest.err conftest.$ac_objext \
21691
 
    conftest$ac_exeext conftest.$ac_ext
21692
 
LIBS=$ac_check_lib_save_LIBS
21693
 
fi
21694
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
21695
 
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
21696
 
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
21697
 
  have_valid_opencl=yes
21698
 
else
21699
 
  have_valid_opencl=no
21700
 
fi
21701
 
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
21702
 
 
21703
 
        unset ac_cv_lib_OpenCL_main
21704
 
        if test "$have_valid_opencl" = "no" ; then
21705
 
            if test ""no"" = "no" -a "$__opencl_dir" != "no" ; then
21706
 
                __opencl_lib_dir="$__opencl_dir/lib64"
21707
 
                LDFLAGS="${SAVED_LDFLAGS} -L$__opencl_lib_dir"
21708
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
21709
 
$as_echo_n "checking for main in -lOpenCL... " >&6; }
21710
 
if ${ac_cv_lib_OpenCL_main+:} false; then :
21711
 
  $as_echo_n "(cached) " >&6
21712
 
else
21713
 
  ac_check_lib_save_LIBS=$LIBS
21714
 
LIBS="-lOpenCL  $LIBS"
21715
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21716
 
/* end confdefs.h.  */
21717
 
 
21718
 
 
21719
 
int
21720
 
main ()
21721
 
{
21722
 
return main ();
21723
 
  ;
21724
 
  return 0;
21725
 
}
21726
 
_ACEOF
21727
 
if ac_fn_c_try_link "$LINENO"; then :
21728
 
  ac_cv_lib_OpenCL_main=yes
21729
 
else
21730
 
  ac_cv_lib_OpenCL_main=no
21731
 
fi
21732
 
rm -f core conftest.err conftest.$ac_objext \
21733
 
    conftest$ac_exeext conftest.$ac_ext
21734
 
LIBS=$ac_check_lib_save_LIBS
21735
 
fi
21736
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
21737
 
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
21738
 
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
21739
 
  have_valid_opencl=yes
21740
 
else
21741
 
  have_valid_opencl=no
21742
 
fi
21743
 
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
21744
 
 
21745
 
                unset ac_cv_lib_OpenCL_main
21746
 
            fi
 
22625
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
22626
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
22627
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
22628
  $as_echo_n "(cached) " >&6
 
22629
else
 
22630
  ac_check_lib_save_LIBS=$LIBS
 
22631
LIBS="-lOpenCL  $LIBS"
 
22632
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
22633
/* end confdefs.h.  */
 
22634
 
 
22635
 
 
22636
int
 
22637
main ()
 
22638
{
 
22639
return main ();
 
22640
  ;
 
22641
  return 0;
 
22642
}
 
22643
_ACEOF
 
22644
if ac_fn_c_try_link "$LINENO"; then :
 
22645
  ac_cv_lib_OpenCL_main=yes
 
22646
else
 
22647
  ac_cv_lib_OpenCL_main=no
 
22648
fi
 
22649
rm -f core conftest.err conftest.$ac_objext \
 
22650
    conftest$ac_exeext conftest.$ac_ext
 
22651
LIBS=$ac_check_lib_save_LIBS
 
22652
fi
 
22653
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
22654
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
22655
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
22656
  have_valid_opencl=yes
 
22657
else
 
22658
  have_valid_opencl=no
 
22659
fi
 
22660
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
22661
 
 
22662
            unset ac_cv_lib_OpenCL_main
 
22663
        else
 
22664
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir" >&5
 
22665
$as_echo_n "checking whether OpenCL is available in $__opencl_dir... " >&6; }
 
22666
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
22667
$as_echo "" >&6; }
 
22668
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
22669
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
22670
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
22671
  $as_echo_n "(cached) " >&6
 
22672
else
 
22673
  ac_check_lib_save_LIBS=$LIBS
 
22674
LIBS="-lOpenCL  $LIBS"
 
22675
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
22676
/* end confdefs.h.  */
 
22677
 
 
22678
 
 
22679
int
 
22680
main ()
 
22681
{
 
22682
return main ();
 
22683
  ;
 
22684
  return 0;
 
22685
}
 
22686
_ACEOF
 
22687
if ac_fn_c_try_link "$LINENO"; then :
 
22688
  ac_cv_lib_OpenCL_main=yes
 
22689
else
 
22690
  ac_cv_lib_OpenCL_main=no
 
22691
fi
 
22692
rm -f core conftest.err conftest.$ac_objext \
 
22693
    conftest$ac_exeext conftest.$ac_ext
 
22694
LIBS=$ac_check_lib_save_LIBS
 
22695
fi
 
22696
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
22697
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
22698
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
22699
  have_valid_opencl=yes
 
22700
else
 
22701
  have_valid_opencl=no
 
22702
fi
 
22703
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
22704
 
 
22705
            unset ac_cv_lib_OpenCL_main
 
22706
            if test "$have_valid_opencl" = "no" -a "$__opencl_dir" != "no" ; then
 
22707
                for __cuda_libdir in lib64 lib lib/x86 lib/Win32 ; do
 
22708
                    __opencl_lib_dir="$__opencl_dir/$__cuda_libdir"
 
22709
                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir and $__opencl_lib_dir" >&5
 
22710
$as_echo_n "checking whether OpenCL is available in $__opencl_dir and $__opencl_lib_dir... " >&6; }
 
22711
                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
22712
$as_echo "" >&6; }
 
22713
                    LDFLAGS="${SAVED_LDFLAGS} -L$__opencl_lib_dir"
 
22714
                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
22715
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
22716
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
22717
  $as_echo_n "(cached) " >&6
 
22718
else
 
22719
  ac_check_lib_save_LIBS=$LIBS
 
22720
LIBS="-lOpenCL  $LIBS"
 
22721
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
22722
/* end confdefs.h.  */
 
22723
 
 
22724
 
 
22725
int
 
22726
main ()
 
22727
{
 
22728
return main ();
 
22729
  ;
 
22730
  return 0;
 
22731
}
 
22732
_ACEOF
 
22733
if ac_fn_c_try_link "$LINENO"; then :
 
22734
  ac_cv_lib_OpenCL_main=yes
 
22735
else
 
22736
  ac_cv_lib_OpenCL_main=no
 
22737
fi
 
22738
rm -f core conftest.err conftest.$ac_objext \
 
22739
    conftest$ac_exeext conftest.$ac_ext
 
22740
LIBS=$ac_check_lib_save_LIBS
 
22741
fi
 
22742
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
22743
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
22744
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
22745
  have_valid_opencl=yes
 
22746
else
 
22747
  have_valid_opencl=no
 
22748
fi
 
22749
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
22750
 
 
22751
                    unset ac_cv_lib_OpenCL_main
 
22752
                    if test "$have_valid_opencl" = yes ; then
 
22753
                        break
 
22754
                    fi
 
22755
                done
 
22756
            else
 
22757
                LDFLAGS="${SAVED_LDFLAGS}"
 
22758
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
22759
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
22760
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
22761
  $as_echo_n "(cached) " >&6
 
22762
else
 
22763
  ac_check_lib_save_LIBS=$LIBS
 
22764
LIBS="-lOpenCL  $LIBS"
 
22765
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
22766
/* end confdefs.h.  */
 
22767
 
 
22768
 
 
22769
int
 
22770
main ()
 
22771
{
 
22772
return main ();
 
22773
  ;
 
22774
  return 0;
 
22775
}
 
22776
_ACEOF
 
22777
if ac_fn_c_try_link "$LINENO"; then :
 
22778
  ac_cv_lib_OpenCL_main=yes
 
22779
else
 
22780
  ac_cv_lib_OpenCL_main=no
 
22781
fi
 
22782
rm -f core conftest.err conftest.$ac_objext \
 
22783
    conftest$ac_exeext conftest.$ac_ext
 
22784
LIBS=$ac_check_lib_save_LIBS
 
22785
fi
 
22786
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
22787
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
22788
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
22789
  have_valid_opencl=yes
 
22790
else
 
22791
  have_valid_opencl=no
 
22792
fi
 
22793
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
22794
 
 
22795
                unset ac_cv_lib_OpenCL_main
 
22796
            fi
21747
22797
        fi
21748
22798
    fi
21749
22799
 
21975
23025
  IFS=$as_save_IFS
21976
23026
  test -z "$as_dir" && as_dir=.
21977
23027
    for ac_exec_ext in '' $ac_executable_extensions; do
21978
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
23028
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21979
23029
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
21980
23030
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21981
23031
    break 2
22018
23068
  IFS=$as_save_IFS
22019
23069
  test -z "$as_dir" && as_dir=.
22020
23070
    for ac_exec_ext in '' $ac_executable_extensions; do
22021
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
23071
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22022
23072
    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
22023
23073
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22024
23074
    break 2
22461
23511
        :
22462
23512
fi
22463
23513
        fi
22464
 
 
22465
 
        # if we use monotonic clocks, FxT uses -lrt
22466
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
22467
 
$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
22468
 
if ${ac_cv_lib_rt_clock_gettime+:} false; then :
22469
 
  $as_echo_n "(cached) " >&6
22470
 
else
22471
 
  ac_check_lib_save_LIBS=$LIBS
22472
 
LIBS="-lrt  $LIBS"
22473
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22474
 
/* end confdefs.h.  */
22475
 
 
22476
 
/* Override any GCC internal prototype to avoid an error.
22477
 
   Use char because int might match the return type of a GCC
22478
 
   builtin and then its argument prototype would still apply.  */
22479
 
#ifdef __cplusplus
22480
 
extern "C"
22481
 
#endif
22482
 
char clock_gettime ();
22483
 
int
22484
 
main ()
22485
 
{
22486
 
return clock_gettime ();
22487
 
  ;
22488
 
  return 0;
22489
 
}
22490
 
_ACEOF
22491
 
if ac_fn_c_try_link "$LINENO"; then :
22492
 
  ac_cv_lib_rt_clock_gettime=yes
22493
 
else
22494
 
  ac_cv_lib_rt_clock_gettime=no
22495
 
fi
22496
 
rm -f core conftest.err conftest.$ac_objext \
22497
 
    conftest$ac_exeext conftest.$ac_ext
22498
 
LIBS=$ac_check_lib_save_LIBS
22499
 
fi
22500
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
22501
 
$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
22502
 
if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
22503
 
  cat >>confdefs.h <<_ACEOF
22504
 
#define HAVE_LIBRT 1
22505
 
_ACEOF
22506
 
 
22507
 
  LIBS="-lrt $LIBS"
22508
 
 
22509
 
else
22510
 
  as_fn_error $? "cannot find clock_gettime" "$LINENO" 5
22511
 
fi
22512
 
 
22513
23514
fi
22514
23515
 
22515
23516
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether performance debugging should be enabled" >&5
22859
23860
  IFS=$as_save_IFS
22860
23861
  test -z "$as_dir" && as_dir=.
22861
23862
    for ac_exec_ext in '' $ac_executable_extensions; do
22862
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
23863
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22863
23864
    ac_cv_path_mpicc_path="$as_dir/$ac_word$ac_exec_ext"
22864
23865
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22865
23866
    break 2
22960
23961
  IFS=$as_save_IFS
22961
23962
  test -z "$as_dir" && as_dir=.
22962
23963
    for ac_exec_ext in '' $ac_executable_extensions; do
22963
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
23964
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22964
23965
    ac_cv_path_mpiexec_path="$as_dir/$ac_word$ac_exec_ext"
22965
23966
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22966
23967
    break 2
23078
24079
  IFS=$as_save_IFS
23079
24080
  test -z "$as_dir" && as_dir=.
23080
24081
    for ac_exec_ext in '' $ac_executable_extensions; do
23081
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
24082
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23082
24083
    ac_cv_path_QMAKE="$as_dir/$ac_word$ac_exec_ext"
23083
24084
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23084
24085
    break 2
23346
24347
  GCC_PLUGIN_INCLUDE_DIR="`"$CC" -print-file-name=plugin`/include"
23347
24348
 
23348
24349
  save_CPPFLAGS="$CPPFLAGS"
 
24350
  save_LDFLAGS="$LDFLAGS"
 
24351
 
23349
24352
  CPPFLAGS="-I$GCC_PLUGIN_INCLUDE_DIR"
23350
24353
 
 
24354
  case "$host_os" in
 
24355
    darwin*)
 
24356
      # Darwin's linker errors out when encountering undefined
 
24357
      # symbols, by default.  Tell it to ignore them.
 
24358
      LDFLAGS="-Wl,-undefined -Wl,dynamic_lookup";;
 
24359
  esac
 
24360
 
23351
24361
 
23352
24362
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23353
24363
/* end confdefs.h.  */
23384
24394
 
23385
24395
 
23386
24396
  CPPFLAGS="$save_CPPFLAGS"
 
24397
  LDFLAGS="$save_LDFLAGS"
23387
24398
 
23388
24399
    else
23389
24400
      ac_cv_have_gcc_plugins="no"
23398
24409
  GCC_PLUGIN_INCLUDE_DIR="`"$CC" -print-file-name=plugin`/include"
23399
24410
 
23400
24411
  save_CPPFLAGS="$CPPFLAGS"
 
24412
  save_LDFLAGS="$LDFLAGS"
 
24413
 
23401
24414
  CPPFLAGS="-I$GCC_PLUGIN_INCLUDE_DIR"
23402
24415
 
 
24416
  case "$host_os" in
 
24417
    darwin*)
 
24418
      # Darwin's linker errors out when encountering undefined
 
24419
      # symbols, by default.  Tell it to ignore them.
 
24420
      LDFLAGS="-Wl,-undefined -Wl,dynamic_lookup";;
 
24421
  esac
 
24422
 
23403
24423
 
23404
24424
      ac_fn_c_check_decl "$LINENO" "build_call_expr_loc_array" "ac_cv_have_decl_build_call_expr_loc_array" "#include <gcc-plugin.h>
23405
24425
                 #include <tree.h>
23492
24512
 
23493
24513
 
23494
24514
  CPPFLAGS="$save_CPPFLAGS"
 
24515
  LDFLAGS="$save_LDFLAGS"
23495
24516
 
23496
24517
 
23497
24518
 
23547
24568
  GCC_PLUGIN_INCLUDE_DIR="`"$CC" -print-file-name=plugin`/include"
23548
24569
 
23549
24570
  save_CPPFLAGS="$CPPFLAGS"
 
24571
  save_LDFLAGS="$LDFLAGS"
 
24572
 
23550
24573
  CPPFLAGS="-I$GCC_PLUGIN_INCLUDE_DIR"
23551
24574
 
 
24575
  case "$host_os" in
 
24576
    darwin*)
 
24577
      # Darwin's linker errors out when encountering undefined
 
24578
      # symbols, by default.  Tell it to ignore them.
 
24579
      LDFLAGS="-Wl,-undefined -Wl,dynamic_lookup";;
 
24580
  esac
 
24581
 
23552
24582
 
23553
24583
         { { ac_try=""$GCC_FOR_PLUGIN" "$CPPFLAGS" -fPIC -shared conftest.c -o conftest.so"
23554
24584
case "(($ac_try" in
23566
24596
 
23567
24597
 
23568
24598
  CPPFLAGS="$save_CPPFLAGS"
 
24599
  LDFLAGS="$save_LDFLAGS"
23569
24600
 
23570
24601
 
23571
24602
       # Attempt to use it.
23689
24720
  IFS=$as_save_IFS
23690
24721
  test -z "$as_dir" && as_dir=.
23691
24722
    for ac_exec_ext in '' $ac_executable_extensions; do
23692
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
24723
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23693
24724
    ac_cv_path_GUILE="$as_dir/$ac_word$ac_exec_ext"
23694
24725
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23695
24726
    break 2
23741
24772
  BUILD_GCC_PLUGIN_FALSE=
23742
24773
fi
23743
24774
 
23744
 
 if test "x$GUILE" != "x"; then
23745
 
  HAVE_GUILE_TRUE=
23746
 
  HAVE_GUILE_FALSE='#'
 
24775
 if test "x$run_gcc_plugin_test_suite" = "xyes"; then
 
24776
  RUN_GCC_PLUGIN_TESTS_TRUE=
 
24777
  RUN_GCC_PLUGIN_TESTS_FALSE='#'
23747
24778
else
23748
 
  HAVE_GUILE_TRUE='#'
23749
 
  HAVE_GUILE_FALSE=
 
24779
  RUN_GCC_PLUGIN_TESTS_TRUE='#'
 
24780
  RUN_GCC_PLUGIN_TESTS_FALSE=
23750
24781
fi
23751
24782
 
23752
24783
 
23772
24803
 
23773
24804
        if test "x$has_opencl_being_checked" != "xyes" ; then
23774
24805
 
23775
 
    __opencl_dir=$opencl_dir
23776
 
    __opencl_include_dir=$opencl_include_dir
23777
 
    __opencl_lib_dir=$opencl_lib_dir
 
24806
    __opencl_dir="$opencl_dir"
 
24807
    __opencl_include_dir="$opencl_include_dir"
 
24808
    __opencl_lib_dir="$opencl_lib_dir"
23778
24809
 
23779
24810
    if test "$__opencl_dir" != "no" ; then
23780
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir" >&5
23781
 
$as_echo_n "checking whether OpenCL is available in $__opencl_dir... " >&6; }
 
24811
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir $__opencl_include_dir and $__opencl_lib_dir" >&5
 
24812
$as_echo_n "checking whether OpenCL is available in $__opencl_dir $__opencl_include_dir and $__opencl_lib_dir... " >&6; }
23782
24813
    else
23783
24814
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available" >&5
23784
24815
$as_echo_n "checking whether OpenCL is available... " >&6; }
23789
24820
    if test "$__opencl_include_dir" = "no" -a "$__opencl_dir" != "no" ; then
23790
24821
        __opencl_include_dir="$__opencl_dir/include"
23791
24822
    fi
23792
 
    if test "$__opencl_lib_dir" = "no" -a "$__opencl_dir" != "no" ; then
23793
 
        __opencl_lib_dir="$__opencl_dir/lib"
23794
 
    fi
23795
24823
 
23796
24824
    SAVED_CPPFLAGS="$CPPFLAGS"
23797
24825
    SAVED_LDFLAGS="${LDFLAGS}"
23812
24840
    if test "$have_valid_opencl" = "yes" ; then
23813
24841
        if test "$__opencl_lib_dir" != "no"; then
23814
24842
            LDFLAGS="${SAVED_LDFLAGS} -L$__opencl_lib_dir"
23815
 
        fi
23816
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
23817
 
$as_echo_n "checking for main in -lOpenCL... " >&6; }
23818
 
if ${ac_cv_lib_OpenCL_main+:} false; then :
23819
 
  $as_echo_n "(cached) " >&6
23820
 
else
23821
 
  ac_check_lib_save_LIBS=$LIBS
23822
 
LIBS="-lOpenCL  $LIBS"
23823
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23824
 
/* end confdefs.h.  */
23825
 
 
23826
 
 
23827
 
int
23828
 
main ()
23829
 
{
23830
 
return main ();
23831
 
  ;
23832
 
  return 0;
23833
 
}
23834
 
_ACEOF
23835
 
if ac_fn_c_try_link "$LINENO"; then :
23836
 
  ac_cv_lib_OpenCL_main=yes
23837
 
else
23838
 
  ac_cv_lib_OpenCL_main=no
23839
 
fi
23840
 
rm -f core conftest.err conftest.$ac_objext \
23841
 
    conftest$ac_exeext conftest.$ac_ext
23842
 
LIBS=$ac_check_lib_save_LIBS
23843
 
fi
23844
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
23845
 
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
23846
 
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
23847
 
  have_valid_opencl=yes
23848
 
else
23849
 
  have_valid_opencl=no
23850
 
fi
23851
 
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
23852
 
 
23853
 
        unset ac_cv_lib_OpenCL_main
23854
 
        if test "$have_valid_opencl" = "no" ; then
23855
 
            if test "$opencl_lib_dir" = "no" -a "$__opencl_dir" != "no" ; then
23856
 
                __opencl_lib_dir="$__opencl_dir/lib64"
23857
 
                LDFLAGS="${SAVED_LDFLAGS} -L$__opencl_lib_dir"
23858
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
23859
 
$as_echo_n "checking for main in -lOpenCL... " >&6; }
23860
 
if ${ac_cv_lib_OpenCL_main+:} false; then :
23861
 
  $as_echo_n "(cached) " >&6
23862
 
else
23863
 
  ac_check_lib_save_LIBS=$LIBS
23864
 
LIBS="-lOpenCL  $LIBS"
23865
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23866
 
/* end confdefs.h.  */
23867
 
 
23868
 
 
23869
 
int
23870
 
main ()
23871
 
{
23872
 
return main ();
23873
 
  ;
23874
 
  return 0;
23875
 
}
23876
 
_ACEOF
23877
 
if ac_fn_c_try_link "$LINENO"; then :
23878
 
  ac_cv_lib_OpenCL_main=yes
23879
 
else
23880
 
  ac_cv_lib_OpenCL_main=no
23881
 
fi
23882
 
rm -f core conftest.err conftest.$ac_objext \
23883
 
    conftest$ac_exeext conftest.$ac_ext
23884
 
LIBS=$ac_check_lib_save_LIBS
23885
 
fi
23886
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
23887
 
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
23888
 
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
23889
 
  have_valid_opencl=yes
23890
 
else
23891
 
  have_valid_opencl=no
23892
 
fi
23893
 
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
23894
 
 
23895
 
                unset ac_cv_lib_OpenCL_main
23896
 
            fi
 
24843
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
24844
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
24845
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
24846
  $as_echo_n "(cached) " >&6
 
24847
else
 
24848
  ac_check_lib_save_LIBS=$LIBS
 
24849
LIBS="-lOpenCL  $LIBS"
 
24850
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
24851
/* end confdefs.h.  */
 
24852
 
 
24853
 
 
24854
int
 
24855
main ()
 
24856
{
 
24857
return main ();
 
24858
  ;
 
24859
  return 0;
 
24860
}
 
24861
_ACEOF
 
24862
if ac_fn_c_try_link "$LINENO"; then :
 
24863
  ac_cv_lib_OpenCL_main=yes
 
24864
else
 
24865
  ac_cv_lib_OpenCL_main=no
 
24866
fi
 
24867
rm -f core conftest.err conftest.$ac_objext \
 
24868
    conftest$ac_exeext conftest.$ac_ext
 
24869
LIBS=$ac_check_lib_save_LIBS
 
24870
fi
 
24871
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
24872
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
24873
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
24874
  have_valid_opencl=yes
 
24875
else
 
24876
  have_valid_opencl=no
 
24877
fi
 
24878
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
24879
 
 
24880
            unset ac_cv_lib_OpenCL_main
 
24881
        else
 
24882
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir" >&5
 
24883
$as_echo_n "checking whether OpenCL is available in $__opencl_dir... " >&6; }
 
24884
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
24885
$as_echo "" >&6; }
 
24886
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
24887
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
24888
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
24889
  $as_echo_n "(cached) " >&6
 
24890
else
 
24891
  ac_check_lib_save_LIBS=$LIBS
 
24892
LIBS="-lOpenCL  $LIBS"
 
24893
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
24894
/* end confdefs.h.  */
 
24895
 
 
24896
 
 
24897
int
 
24898
main ()
 
24899
{
 
24900
return main ();
 
24901
  ;
 
24902
  return 0;
 
24903
}
 
24904
_ACEOF
 
24905
if ac_fn_c_try_link "$LINENO"; then :
 
24906
  ac_cv_lib_OpenCL_main=yes
 
24907
else
 
24908
  ac_cv_lib_OpenCL_main=no
 
24909
fi
 
24910
rm -f core conftest.err conftest.$ac_objext \
 
24911
    conftest$ac_exeext conftest.$ac_ext
 
24912
LIBS=$ac_check_lib_save_LIBS
 
24913
fi
 
24914
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
24915
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
24916
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
24917
  have_valid_opencl=yes
 
24918
else
 
24919
  have_valid_opencl=no
 
24920
fi
 
24921
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
24922
 
 
24923
            unset ac_cv_lib_OpenCL_main
 
24924
            if test "$have_valid_opencl" = "no" -a "$__opencl_dir" != "no" ; then
 
24925
                for __cuda_libdir in lib64 lib lib/x86 lib/Win32 ; do
 
24926
                    __opencl_lib_dir="$__opencl_dir/$__cuda_libdir"
 
24927
                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir and $__opencl_lib_dir" >&5
 
24928
$as_echo_n "checking whether OpenCL is available in $__opencl_dir and $__opencl_lib_dir... " >&6; }
 
24929
                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
24930
$as_echo "" >&6; }
 
24931
                    LDFLAGS="${SAVED_LDFLAGS} -L$__opencl_lib_dir"
 
24932
                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
24933
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
24934
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
24935
  $as_echo_n "(cached) " >&6
 
24936
else
 
24937
  ac_check_lib_save_LIBS=$LIBS
 
24938
LIBS="-lOpenCL  $LIBS"
 
24939
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
24940
/* end confdefs.h.  */
 
24941
 
 
24942
 
 
24943
int
 
24944
main ()
 
24945
{
 
24946
return main ();
 
24947
  ;
 
24948
  return 0;
 
24949
}
 
24950
_ACEOF
 
24951
if ac_fn_c_try_link "$LINENO"; then :
 
24952
  ac_cv_lib_OpenCL_main=yes
 
24953
else
 
24954
  ac_cv_lib_OpenCL_main=no
 
24955
fi
 
24956
rm -f core conftest.err conftest.$ac_objext \
 
24957
    conftest$ac_exeext conftest.$ac_ext
 
24958
LIBS=$ac_check_lib_save_LIBS
 
24959
fi
 
24960
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
24961
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
24962
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
24963
  have_valid_opencl=yes
 
24964
else
 
24965
  have_valid_opencl=no
 
24966
fi
 
24967
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
24968
 
 
24969
                    unset ac_cv_lib_OpenCL_main
 
24970
                    if test "$have_valid_opencl" = yes ; then
 
24971
                        break
 
24972
                    fi
 
24973
                done
 
24974
            else
 
24975
                LDFLAGS="${SAVED_LDFLAGS}"
 
24976
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
24977
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
24978
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
24979
  $as_echo_n "(cached) " >&6
 
24980
else
 
24981
  ac_check_lib_save_LIBS=$LIBS
 
24982
LIBS="-lOpenCL  $LIBS"
 
24983
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
24984
/* end confdefs.h.  */
 
24985
 
 
24986
 
 
24987
int
 
24988
main ()
 
24989
{
 
24990
return main ();
 
24991
  ;
 
24992
  return 0;
 
24993
}
 
24994
_ACEOF
 
24995
if ac_fn_c_try_link "$LINENO"; then :
 
24996
  ac_cv_lib_OpenCL_main=yes
 
24997
else
 
24998
  ac_cv_lib_OpenCL_main=no
 
24999
fi
 
25000
rm -f core conftest.err conftest.$ac_objext \
 
25001
    conftest$ac_exeext conftest.$ac_ext
 
25002
LIBS=$ac_check_lib_save_LIBS
 
25003
fi
 
25004
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
25005
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
25006
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
25007
  have_valid_opencl=yes
 
25008
else
 
25009
  have_valid_opencl=no
 
25010
fi
 
25011
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
25012
 
 
25013
                unset ac_cv_lib_OpenCL_main
 
25014
            fi
23897
25015
        fi
23898
25016
    fi
23899
25017
 
23925
25043
 
23926
25044
 
23927
25045
            if test "$have_valid_opencl" = "no" ; then
23928
 
                for f in "/usr/local/cuda" "/c/cuda" "/cygdrive/c/cuda" "/opt/cuda" "$CUDA_INC_PATH/.." "$CUDA_INSTALL_PATH" "$CUDA_TOOLKIT"; do
23929
 
                    if test -n $f ; then
 
25046
                for f in "/usr/local/cuda" "/c/cuda" "/cygdrive/c/cuda" "/opt/cuda" "$CUDA_PATH" "$CUDA_INC_PATH/.." "$CUDA_INSTALL_PATH" "$CUDA_TOOLKIT"; do
 
25047
                    if test -n "$f" ; then
23930
25048
 
23931
 
    __opencl_dir=$f
 
25049
    __opencl_dir="$f"
23932
25050
    __opencl_include_dir="no"
23933
25051
    __opencl_lib_dir="no"
23934
25052
 
23935
25053
    if test "$__opencl_dir" != "no" ; then
23936
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir" >&5
23937
 
$as_echo_n "checking whether OpenCL is available in $__opencl_dir... " >&6; }
 
25054
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir $__opencl_include_dir and $__opencl_lib_dir" >&5
 
25055
$as_echo_n "checking whether OpenCL is available in $__opencl_dir $__opencl_include_dir and $__opencl_lib_dir... " >&6; }
23938
25056
    else
23939
25057
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available" >&5
23940
25058
$as_echo_n "checking whether OpenCL is available... " >&6; }
23945
25063
    if test "$__opencl_include_dir" = "no" -a "$__opencl_dir" != "no" ; then
23946
25064
        __opencl_include_dir="$__opencl_dir/include"
23947
25065
    fi
23948
 
    if test "$__opencl_lib_dir" = "no" -a "$__opencl_dir" != "no" ; then
23949
 
        __opencl_lib_dir="$__opencl_dir/lib"
23950
 
    fi
23951
25066
 
23952
25067
    SAVED_CPPFLAGS="$CPPFLAGS"
23953
25068
    SAVED_LDFLAGS="${LDFLAGS}"
23968
25083
    if test "$have_valid_opencl" = "yes" ; then
23969
25084
        if test "$__opencl_lib_dir" != "no"; then
23970
25085
            LDFLAGS="${SAVED_LDFLAGS} -L$__opencl_lib_dir"
23971
 
        fi
23972
 
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
23973
 
$as_echo_n "checking for main in -lOpenCL... " >&6; }
23974
 
if ${ac_cv_lib_OpenCL_main+:} false; then :
23975
 
  $as_echo_n "(cached) " >&6
23976
 
else
23977
 
  ac_check_lib_save_LIBS=$LIBS
23978
 
LIBS="-lOpenCL  $LIBS"
23979
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23980
 
/* end confdefs.h.  */
23981
 
 
23982
 
 
23983
 
int
23984
 
main ()
23985
 
{
23986
 
return main ();
23987
 
  ;
23988
 
  return 0;
23989
 
}
23990
 
_ACEOF
23991
 
if ac_fn_c_try_link "$LINENO"; then :
23992
 
  ac_cv_lib_OpenCL_main=yes
23993
 
else
23994
 
  ac_cv_lib_OpenCL_main=no
23995
 
fi
23996
 
rm -f core conftest.err conftest.$ac_objext \
23997
 
    conftest$ac_exeext conftest.$ac_ext
23998
 
LIBS=$ac_check_lib_save_LIBS
23999
 
fi
24000
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
24001
 
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
24002
 
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
24003
 
  have_valid_opencl=yes
24004
 
else
24005
 
  have_valid_opencl=no
24006
 
fi
24007
 
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
24008
 
 
24009
 
        unset ac_cv_lib_OpenCL_main
24010
 
        if test "$have_valid_opencl" = "no" ; then
24011
 
            if test ""no"" = "no" -a "$__opencl_dir" != "no" ; then
24012
 
                __opencl_lib_dir="$__opencl_dir/lib64"
24013
 
                LDFLAGS="${SAVED_LDFLAGS} -L$__opencl_lib_dir"
24014
 
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
24015
 
$as_echo_n "checking for main in -lOpenCL... " >&6; }
24016
 
if ${ac_cv_lib_OpenCL_main+:} false; then :
24017
 
  $as_echo_n "(cached) " >&6
24018
 
else
24019
 
  ac_check_lib_save_LIBS=$LIBS
24020
 
LIBS="-lOpenCL  $LIBS"
24021
 
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24022
 
/* end confdefs.h.  */
24023
 
 
24024
 
 
24025
 
int
24026
 
main ()
24027
 
{
24028
 
return main ();
24029
 
  ;
24030
 
  return 0;
24031
 
}
24032
 
_ACEOF
24033
 
if ac_fn_c_try_link "$LINENO"; then :
24034
 
  ac_cv_lib_OpenCL_main=yes
24035
 
else
24036
 
  ac_cv_lib_OpenCL_main=no
24037
 
fi
24038
 
rm -f core conftest.err conftest.$ac_objext \
24039
 
    conftest$ac_exeext conftest.$ac_ext
24040
 
LIBS=$ac_check_lib_save_LIBS
24041
 
fi
24042
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
24043
 
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
24044
 
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
24045
 
  have_valid_opencl=yes
24046
 
else
24047
 
  have_valid_opencl=no
24048
 
fi
24049
 
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
24050
 
 
24051
 
                unset ac_cv_lib_OpenCL_main
24052
 
            fi
 
25086
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
25087
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
25088
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
25089
  $as_echo_n "(cached) " >&6
 
25090
else
 
25091
  ac_check_lib_save_LIBS=$LIBS
 
25092
LIBS="-lOpenCL  $LIBS"
 
25093
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
25094
/* end confdefs.h.  */
 
25095
 
 
25096
 
 
25097
int
 
25098
main ()
 
25099
{
 
25100
return main ();
 
25101
  ;
 
25102
  return 0;
 
25103
}
 
25104
_ACEOF
 
25105
if ac_fn_c_try_link "$LINENO"; then :
 
25106
  ac_cv_lib_OpenCL_main=yes
 
25107
else
 
25108
  ac_cv_lib_OpenCL_main=no
 
25109
fi
 
25110
rm -f core conftest.err conftest.$ac_objext \
 
25111
    conftest$ac_exeext conftest.$ac_ext
 
25112
LIBS=$ac_check_lib_save_LIBS
 
25113
fi
 
25114
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
25115
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
25116
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
25117
  have_valid_opencl=yes
 
25118
else
 
25119
  have_valid_opencl=no
 
25120
fi
 
25121
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
25122
 
 
25123
            unset ac_cv_lib_OpenCL_main
 
25124
        else
 
25125
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir" >&5
 
25126
$as_echo_n "checking whether OpenCL is available in $__opencl_dir... " >&6; }
 
25127
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
25128
$as_echo "" >&6; }
 
25129
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
25130
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
25131
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
25132
  $as_echo_n "(cached) " >&6
 
25133
else
 
25134
  ac_check_lib_save_LIBS=$LIBS
 
25135
LIBS="-lOpenCL  $LIBS"
 
25136
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
25137
/* end confdefs.h.  */
 
25138
 
 
25139
 
 
25140
int
 
25141
main ()
 
25142
{
 
25143
return main ();
 
25144
  ;
 
25145
  return 0;
 
25146
}
 
25147
_ACEOF
 
25148
if ac_fn_c_try_link "$LINENO"; then :
 
25149
  ac_cv_lib_OpenCL_main=yes
 
25150
else
 
25151
  ac_cv_lib_OpenCL_main=no
 
25152
fi
 
25153
rm -f core conftest.err conftest.$ac_objext \
 
25154
    conftest$ac_exeext conftest.$ac_ext
 
25155
LIBS=$ac_check_lib_save_LIBS
 
25156
fi
 
25157
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
25158
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
25159
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
25160
  have_valid_opencl=yes
 
25161
else
 
25162
  have_valid_opencl=no
 
25163
fi
 
25164
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
25165
 
 
25166
            unset ac_cv_lib_OpenCL_main
 
25167
            if test "$have_valid_opencl" = "no" -a "$__opencl_dir" != "no" ; then
 
25168
                for __cuda_libdir in lib64 lib lib/x86 lib/Win32 ; do
 
25169
                    __opencl_lib_dir="$__opencl_dir/$__cuda_libdir"
 
25170
                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenCL is available in $__opencl_dir and $__opencl_lib_dir" >&5
 
25171
$as_echo_n "checking whether OpenCL is available in $__opencl_dir and $__opencl_lib_dir... " >&6; }
 
25172
                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
 
25173
$as_echo "" >&6; }
 
25174
                    LDFLAGS="${SAVED_LDFLAGS} -L$__opencl_lib_dir"
 
25175
                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
25176
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
25177
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
25178
  $as_echo_n "(cached) " >&6
 
25179
else
 
25180
  ac_check_lib_save_LIBS=$LIBS
 
25181
LIBS="-lOpenCL  $LIBS"
 
25182
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
25183
/* end confdefs.h.  */
 
25184
 
 
25185
 
 
25186
int
 
25187
main ()
 
25188
{
 
25189
return main ();
 
25190
  ;
 
25191
  return 0;
 
25192
}
 
25193
_ACEOF
 
25194
if ac_fn_c_try_link "$LINENO"; then :
 
25195
  ac_cv_lib_OpenCL_main=yes
 
25196
else
 
25197
  ac_cv_lib_OpenCL_main=no
 
25198
fi
 
25199
rm -f core conftest.err conftest.$ac_objext \
 
25200
    conftest$ac_exeext conftest.$ac_ext
 
25201
LIBS=$ac_check_lib_save_LIBS
 
25202
fi
 
25203
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
25204
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
25205
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
25206
  have_valid_opencl=yes
 
25207
else
 
25208
  have_valid_opencl=no
 
25209
fi
 
25210
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
25211
 
 
25212
                    unset ac_cv_lib_OpenCL_main
 
25213
                    if test "$have_valid_opencl" = yes ; then
 
25214
                        break
 
25215
                    fi
 
25216
                done
 
25217
            else
 
25218
                LDFLAGS="${SAVED_LDFLAGS}"
 
25219
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lOpenCL" >&5
 
25220
$as_echo_n "checking for main in -lOpenCL... " >&6; }
 
25221
if ${ac_cv_lib_OpenCL_main+:} false; then :
 
25222
  $as_echo_n "(cached) " >&6
 
25223
else
 
25224
  ac_check_lib_save_LIBS=$LIBS
 
25225
LIBS="-lOpenCL  $LIBS"
 
25226
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
25227
/* end confdefs.h.  */
 
25228
 
 
25229
 
 
25230
int
 
25231
main ()
 
25232
{
 
25233
return main ();
 
25234
  ;
 
25235
  return 0;
 
25236
}
 
25237
_ACEOF
 
25238
if ac_fn_c_try_link "$LINENO"; then :
 
25239
  ac_cv_lib_OpenCL_main=yes
 
25240
else
 
25241
  ac_cv_lib_OpenCL_main=no
 
25242
fi
 
25243
rm -f core conftest.err conftest.$ac_objext \
 
25244
    conftest$ac_exeext conftest.$ac_ext
 
25245
LIBS=$ac_check_lib_save_LIBS
 
25246
fi
 
25247
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_OpenCL_main" >&5
 
25248
$as_echo "$ac_cv_lib_OpenCL_main" >&6; }
 
25249
if test "x$ac_cv_lib_OpenCL_main" = xyes; then :
 
25250
  have_valid_opencl=yes
 
25251
else
 
25252
  have_valid_opencl=no
 
25253
fi
 
25254
ac_cv_lib_OpenCL=ac_cv_lib_OpenCL_main
 
25255
 
 
25256
                unset ac_cv_lib_OpenCL_main
 
25257
            fi
24053
25258
        fi
24054
25259
    fi
24055
25260
 
24147
25352
  IFS=$as_save_IFS
24148
25353
  test -z "$as_dir" && as_dir=.
24149
25354
    for ac_exec_ext in '' $ac_executable_extensions; do
24150
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
25355
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24151
25356
    ac_cv_path_GDB="$as_dir/$ac_word$ac_exec_ext"
24152
25357
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24153
25358
    break 2
25859
27064
 
25860
27065
# Check whether --with-hwloc was given.
25861
27066
if test "${with_hwloc+set}" = set; then :
25862
 
  withval=$with_hwloc;
 
27067
  withval=$with_hwloc; hwloc_dir="$withval"
25863
27068
fi
25864
27069
 
25865
27070
SAVED_LDFLAGS="${LDFLAGS}"
25945
27150
fi
25946
27151
        if test "$have_valid_hwloc" = "no"; then :
25947
27152
 
25948
 
                hwloc_dir="$withval"
25949
 
                CPPFLAGS="${SAVED_CPPFLAGS} -I$hwloc_dir/include"
 
27153
                if test "$hwloc_dir" != "" ; then CPPFLAGS="${SAVED_CPPFLAGS} -I$hwloc_dir/include" ; fi
25950
27154
                ac_fn_c_check_header_mongrel "$LINENO" "hwloc.h" "ac_cv_header_hwloc_h" "$ac_includes_default"
25951
27155
if test "x$ac_cv_header_hwloc_h" = xyes; then :
25952
27156
  have_valid_hwloc=yes
25955
27159
fi
25956
27160
 
25957
27161
 
25958
 
                LDFLAGS="${SAVED_LDFLAGS} -L$hwloc_dir/lib"
 
27162
                if test "$hwloc_dir" != "" ; then LDFLAGS="${SAVED_LDFLAGS} -L$hwloc_dir/lib" ; fi
25959
27163
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lhwloc" >&5
25960
27164
$as_echo_n "checking for main in -lhwloc... " >&6; }
25961
27165
if ${ac_cv_lib_hwloc_main+:} false; then :
26016
27220
fi
26017
27221
LDFLAGS="${SAVED_LDFLAGS}"
26018
27222
CPPFLAGS="${SAVED_CPPFLAGS}"
 
27223
 
 
27224
if test "$have_valid_hwloc" = "no" -a "$hwloc_dir" != "no" ; then
 
27225
   as_fn_error $? "hwloc was not found on your system. If the target machine is hyperthreaded the performance may be impacted a lot.  It is strongly recommended to install hwloc. However, if you really want to use StarPU without enabling hwloc, please restart configure by specifying the option '--without-hwloc'." "$LINENO" 5
 
27226
fi
26019
27227
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether hwloc should be used" >&5
26020
27228
$as_echo_n "checking whether hwloc should be used... " >&6; }
26021
27229
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_valid_hwloc" >&5
26071
27279
  IFS=$as_save_IFS
26072
27280
  test -z "$as_dir" && as_dir=.
26073
27281
    for ac_exec_ext in '' $ac_executable_extensions; do
26074
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
27282
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26075
27283
    ac_cv_prog_ICC="$ac_prog"
26076
27284
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26077
27285
    break 2
26102
27310
$as_echo_n "checking whether CUDA and ICC are compatible... " >&6; }
26103
27311
   OLD_CC="$CC"
26104
27312
   CC="$ICC"
 
27313
   OLD_CFLAGS="$CFLAGS"
 
27314
   CFLAGS="-I$PWD/include -I$srcdir/include"
26105
27315
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26106
27316
/* end confdefs.h.  */
26107
27317
#include <cuda.h>
 
27318
           #include <starpu.h>
26108
27319
int
26109
27320
main ()
26110
27321
{
26125
27336
fi
26126
27337
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26127
27338
   CC="$OLD_CC"
 
27339
   CFLAGS="$OLD_CFLAGS"
26128
27340
fi
26129
27341
 
26130
27342
# Disable ICC on windows
26164
27376
  IFS=$as_save_IFS
26165
27377
  test -z "$as_dir" && as_dir=.
26166
27378
    for ac_exec_ext in '' $ac_executable_extensions; do
26167
 
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
27379
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26168
27380
    ac_cv_prog_HELP2MAN="$ac_prog"
26169
27381
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26170
27382
    break 2
26415
27627
  as_fn_error $? "conditional \"BUILD_GCC_PLUGIN\" was never defined.
26416
27628
Usually this means the macro was only invoked conditionally." "$LINENO" 5
26417
27629
fi
26418
 
if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
26419
 
  as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
 
27630
if test -z "${RUN_GCC_PLUGIN_TESTS_TRUE}" && test -z "${RUN_GCC_PLUGIN_TESTS_FALSE}"; then
 
27631
  as_fn_error $? "conditional \"RUN_GCC_PLUGIN_TESTS\" was never defined.
26420
27632
Usually this means the macro was only invoked conditionally." "$LINENO" 5
26421
27633
fi
26422
27634
if test -z "${BUILD_SOCL_TRUE}" && test -z "${BUILD_SOCL_FALSE}"; then
26777
27989
    # ... but there are two gotchas:
26778
27990
    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26779
27991
    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26780
 
    # In both cases, we have to default to `cp -p'.
 
27992
    # In both cases, we have to default to `cp -pR'.
26781
27993
    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
26782
 
      as_ln_s='cp -p'
 
27994
      as_ln_s='cp -pR'
26783
27995
  elif ln conf$$.file conf$$ 2>/dev/null; then
26784
27996
    as_ln_s=ln
26785
27997
  else
26786
 
    as_ln_s='cp -p'
 
27998
    as_ln_s='cp -pR'
26787
27999
  fi
26788
28000
else
26789
 
  as_ln_s='cp -p'
 
28001
  as_ln_s='cp -pR'
26790
28002
fi
26791
28003
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26792
28004
rmdir conf$$.dir 2>/dev/null
26846
28058
  as_mkdir_p=false
26847
28059
fi
26848
28060
 
26849
 
if test -x / >/dev/null 2>&1; then
26850
 
  as_test_x='test -x'
26851
 
else
26852
 
  if ls -dL / >/dev/null 2>&1; then
26853
 
    as_ls_L_option=L
26854
 
  else
26855
 
    as_ls_L_option=
26856
 
  fi
26857
 
  as_test_x='
26858
 
    eval sh -c '\''
26859
 
      if test -d "$1"; then
26860
 
        test -d "$1/.";
26861
 
      else
26862
 
        case $1 in #(
26863
 
        -*)set "./$1";;
26864
 
        esac;
26865
 
        case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
26866
 
        ???[sx]*):;;*)false;;esac;fi
26867
 
    '\'' sh
26868
 
  '
26869
 
fi
26870
 
as_executable_p=$as_test_x
 
28061
 
 
28062
# as_fn_executable_p FILE
 
28063
# -----------------------
 
28064
# Test if FILE is an executable regular file.
 
28065
as_fn_executable_p ()
 
28066
{
 
28067
  test -f "$1" && test -x "$1"
 
28068
} # as_fn_executable_p
 
28069
as_test_x='test -x'
 
28070
as_executable_p=as_fn_executable_p
26871
28071
 
26872
28072
# Sed expression to map a string onto a valid CPP name.
26873
28073
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
26888
28088
# report actual input values of CONFIG_FILES etc. instead of their
26889
28089
# values after options handling.
26890
28090
ac_log="
26891
 
This file was extended by StarPU $as_me 1.0.0, which was
26892
 
generated by GNU Autoconf 2.68.  Invocation command line was
 
28091
This file was extended by StarPU $as_me 1.0.1, which was
 
28092
generated by GNU Autoconf 2.69.  Invocation command line was
26893
28093
 
26894
28094
  CONFIG_FILES    = $CONFIG_FILES
26895
28095
  CONFIG_HEADERS  = $CONFIG_HEADERS
26954
28154
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26955
28155
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
26956
28156
ac_cs_version="\\
26957
 
StarPU config.status 1.0.0
26958
 
configured by $0, generated by GNU Autoconf 2.68,
 
28157
StarPU config.status 1.0.1
 
28158
configured by $0, generated by GNU Autoconf 2.69,
26959
28159
  with options \\"\$ac_cs_config\\"
26960
28160
 
26961
 
Copyright (C) 2010 Free Software Foundation, Inc.
 
28161
Copyright (C) 2012 Free Software Foundation, Inc.
26962
28162
This config.status script is free software; the Free Software Foundation
26963
28163
gives unlimited permission to copy, distribute and modify it."
26964
28164
 
27049
28249
_ACEOF
27050
28250
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27051
28251
if \$ac_cs_recheck; then
27052
 
  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
 
28252
  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
27053
28253
  shift
27054
28254
  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
27055
28255
  CONFIG_SHELL='$SHELL'
29339
30539
               GCC plug-in test suite (requires GNU Guile): $run_gcc_plugin_test_suite
29340
30540
               SOCL enabled:  $build_socl
29341
30541
" >&6;}
 
30542
 
 
30543
if test x"$have_valid_hwloc" = xno
 
30544
then
 
30545
  { $as_echo "$as_me:${as_lineno-$LINENO}:
 
30546
WARNING: hwloc was not enabled.  If the target machine is hyperthreaded the
 
30547
performance may be impacted a lot.  It is strongly recommended to install
 
30548
hwloc" >&5
 
30549
$as_echo "$as_me:
 
30550
WARNING: hwloc was not enabled.  If the target machine is hyperthreaded the
 
30551
performance may be impacted a lot.  It is strongly recommended to install
 
30552
hwloc" >&6;}
 
30553
fi