20317
20338
if test x$enable_cuda = xyes -o x$enable_cuda = xmaybe; then
20319
__cuda_dir=$cuda_dir
20320
__cuda_lib_dir=$cuda_lib_dir
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; }
20326
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available" >&5
20327
$as_echo_n "checking whether CUDA is available... " >&6; }
20329
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
20332
if test "$__cuda_lib_dir" = "no" -a "$__cuda_dir" != "no" ; then
20333
__cuda_lib_dir="$__cuda_dir/lib"
20336
SAVED_LDFLAGS="${LDFLAGS}"
20338
if test "$__cuda_dir" != "no" ; then
20339
STARPU_CUDA_LDFLAGS="-L${__cuda_lib_dir}"
20340
LDFLAGS="${SAVED_LDFLAGS} -L${__cuda_lib_dir}"
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
20348
ac_check_lib_save_LIBS=$LIBS
20349
LIBS="-lcuda $LIBS"
20350
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20351
/* end confdefs.h. */
20362
if ac_fn_c_try_link "$LINENO"; then :
20363
ac_cv_lib_cuda_main=yes
20365
ac_cv_lib_cuda_main=no
20367
rm -f core conftest.err conftest.$ac_objext \
20368
conftest$ac_exeext conftest.$ac_ext
20369
LIBS=$ac_check_lib_save_LIBS
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
20378
ac_cv_lib_cuda=ac_cv_lib_cuda_main
20380
unset ac_cv_lib_cuda_main
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
20391
ac_check_lib_save_LIBS=$LIBS
20392
LIBS="-lcuda $LIBS"
20393
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20394
/* end confdefs.h. */
20405
if ac_fn_c_try_link "$LINENO"; then :
20406
ac_cv_lib_cuda_main=yes
20408
ac_cv_lib_cuda_main=no
20410
rm -f core conftest.err conftest.$ac_objext \
20411
conftest$ac_exeext conftest.$ac_ext
20412
LIBS=$ac_check_lib_save_LIBS
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
20421
ac_cv_lib_cuda=ac_cv_lib_cuda_main
20423
unset ac_cv_lib_cuda_main
20427
if test "$have_valid_cuda" = "no" ; then
20428
LDFLAGS="${SAVED_LDFLAGS}"
20429
unset STARPU_CUDA_LDFLAGS
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
20436
__cuda_lib_dir="no"
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; }
20442
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available" >&5
20443
$as_echo_n "checking whether CUDA is available... " >&6; }
20445
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
20448
if test "$__cuda_lib_dir" = "no" -a "$__cuda_dir" != "no" ; then
20449
__cuda_lib_dir="$__cuda_dir/lib"
20452
SAVED_LDFLAGS="${LDFLAGS}"
20454
if test "$__cuda_dir" != "no" ; then
20455
STARPU_CUDA_LDFLAGS="-L${__cuda_lib_dir}"
20456
LDFLAGS="${SAVED_LDFLAGS} -L${__cuda_lib_dir}"
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
20464
ac_check_lib_save_LIBS=$LIBS
20465
LIBS="-lcuda $LIBS"
20466
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20467
/* end confdefs.h. */
20478
if ac_fn_c_try_link "$LINENO"; then :
20479
ac_cv_lib_cuda_main=yes
20481
ac_cv_lib_cuda_main=no
20483
rm -f core conftest.err conftest.$ac_objext \
20484
conftest$ac_exeext conftest.$ac_ext
20485
LIBS=$ac_check_lib_save_LIBS
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
20494
ac_cv_lib_cuda=ac_cv_lib_cuda_main
20496
unset ac_cv_lib_cuda_main
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
20507
ac_check_lib_save_LIBS=$LIBS
20508
LIBS="-lcuda $LIBS"
20509
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20510
/* end confdefs.h. */
20521
if ac_fn_c_try_link "$LINENO"; then :
20522
ac_cv_lib_cuda_main=yes
20524
ac_cv_lib_cuda_main=no
20526
rm -f core conftest.err conftest.$ac_objext \
20527
conftest$ac_exeext conftest.$ac_ext
20528
LIBS=$ac_check_lib_save_LIBS
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
20537
ac_cv_lib_cuda=ac_cv_lib_cuda_main
20539
unset ac_cv_lib_cuda_main
20543
if test "$have_valid_cuda" = "no" ; then
20544
LDFLAGS="${SAVED_LDFLAGS}"
20545
unset STARPU_CUDA_LDFLAGS
20548
if test "$have_valid_cuda" = "yes" ; then
20554
if test "$have_valid_cuda" = "yes" ; then
20556
__cuda_dir=$cuda_dir
20557
__cuda_include_dir=$cuda_include_dir
20558
__cuda_lib_dir=$cuda_lib_dir
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; }
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; }
20567
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
20570
if test "$__cuda_include_dir" = "no" -a "$__cuda_dir" != "no" ; then
20571
__cuda_include_dir="$__cuda_dir/include"
20573
if test "$__cuda_lib_dir" = "no" -a "$__cuda_dir" != "no" ; then
20574
__cuda_lib_dir="$__cuda_dir/lib"
20577
SAVED_CPPFLAGS="$CPPFLAGS"
20578
SAVED_LDFLAGS="${LDFLAGS}"
20579
SAVED_STARPU_CUDA_LDFLAGS=${STARPU_CUDA_LDFLAGS}
20581
if test "$__cuda_lib_dir" != "no" ; then
20582
STARPU_CUDA_LDFLAGS="${SAVED_STARPU_CUDA_LDFLAGS} -L$__cuda_lib_dir"
20584
if test "$__cuda_include_dir" != "no" ; then
20585
CPPFLAGS="${CPPFLAGS} -I$__cuda_include_dir"
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
20596
unset ac_cv_header_cuda_h
20598
if test "$have_valid_cuda" = "yes" ; then
20599
if test "$__cuda_lib_dir" != "no"; then
20600
LDFLAGS="${SAVED_LDFLAGS} -L$__cuda_lib_dir"
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
20607
ac_check_lib_save_LIBS=$LIBS
20608
LIBS="-lcudart $LIBS"
20609
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20610
/* end confdefs.h. */
20621
if ac_fn_c_try_link "$LINENO"; then :
20622
ac_cv_lib_cudart_main=yes
20624
ac_cv_lib_cudart_main=no
20626
rm -f core conftest.err conftest.$ac_objext \
20627
conftest$ac_exeext conftest.$ac_ext
20628
LIBS=$ac_check_lib_save_LIBS
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
20637
ac_cv_lib_cudart=ac_cv_lib_cudart_main
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
20650
ac_check_lib_save_LIBS=$LIBS
20651
LIBS="-lcudart $LIBS"
20652
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20653
/* end confdefs.h. */
20664
if ac_fn_c_try_link "$LINENO"; then :
20665
ac_cv_lib_cudart_main=yes
20667
ac_cv_lib_cudart_main=no
20669
rm -f core conftest.err conftest.$ac_objext \
20670
conftest$ac_exeext conftest.$ac_ext
20671
LIBS=$ac_check_lib_save_LIBS
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
20680
ac_cv_lib_cudart=ac_cv_lib_cudart_main
20682
unset ac_cv_lib_cudart_main
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
20696
ac_check_lib_save_LIBS=$LIBS
20697
LIBS="-lcublas $LIBS"
20698
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20699
/* end confdefs.h. */
20710
if ac_fn_c_try_link "$LINENO"; then :
20711
ac_cv_lib_cublas_main=yes
20713
ac_cv_lib_cublas_main=no
20715
rm -f core conftest.err conftest.$ac_objext \
20716
conftest$ac_exeext conftest.$ac_ext
20717
LIBS=$ac_check_lib_save_LIBS
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
20726
ac_cv_lib_cublas=ac_cv_lib_cublas_main
20728
unset ac_cv_lib_cublas_main
20729
if test "$have_valid_cuda" = "yes" ; then
20730
STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
20734
CPPFLAGS="${SAVED_CPPFLAGS}"
20735
LDFLAGS="${SAVED_LDFLAGS}"
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"
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
20340
__cuda_dir="$cuda_dir"
20341
__cuda_include_dir="$cuda_include_dir"
20342
__cuda_lib_dir="$cuda_lib_dir"
20344
if test -z "$__cuda_lib_dir" ; then
20347
if test -z "$__cuda_include_dir" ; then
20348
__cuda_include_dir=no
20350
if test -z "$__cuda_dir" ; then
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; }
20358
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available" >&5
20359
$as_echo_n "checking whether CUDA is available... " >&6; }
20361
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
20364
if test "$__cuda_include_dir" = "no" -a "$__cuda_dir" != "no" ; then
20365
__cuda_include_dir="$__cuda_dir/include"
20368
SAVED_CPPFLAGS="$CPPFLAGS"
20371
if test "$__cuda_include_dir" != "no" ; then
20372
CPPFLAGS="${CPPFLAGS} -I$__cuda_include_dir"
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
20383
unset ac_cv_header_cuda_h
20385
if test "$have_valid_cuda" = "yes" ; then
20386
if test "$__cuda_lib_dir" != "no" ; then
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
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
20401
ac_check_lib_save_LIBS=$LIBS
20402
LIBS="-lcuda $LIBS"
20403
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20404
/* end confdefs.h. */
20415
if ac_fn_c_try_link "$LINENO"; then :
20416
ac_cv_lib_cuda_main=yes
20418
ac_cv_lib_cuda_main=no
20420
rm -f core conftest.err conftest.$ac_objext \
20421
conftest$ac_exeext conftest.$ac_ext
20422
LIBS=$ac_check_lib_save_LIBS
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
20431
ac_cv_lib_cuda=ac_cv_lib_cuda_main
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
20440
ac_check_lib_save_LIBS=$LIBS
20441
LIBS="-lcudart $LIBS"
20442
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20443
/* end confdefs.h. */
20454
if ac_fn_c_try_link "$LINENO"; then :
20455
ac_cv_lib_cudart_main=yes
20457
ac_cv_lib_cudart_main=no
20459
rm -f core conftest.err conftest.$ac_objext \
20460
conftest$ac_exeext conftest.$ac_ext
20461
LIBS=$ac_check_lib_save_LIBS
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
20470
ac_cv_lib_cudart=ac_cv_lib_cudart_main
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
20482
ac_check_lib_save_LIBS=$LIBS
20483
LIBS="-lcublas $LIBS"
20484
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20485
/* end confdefs.h. */
20496
if ac_fn_c_try_link "$LINENO"; then :
20497
ac_cv_lib_cublas_main=yes
20499
ac_cv_lib_cublas_main=no
20501
rm -f core conftest.err conftest.$ac_objext \
20502
conftest$ac_exeext conftest.$ac_ext
20503
LIBS=$ac_check_lib_save_LIBS
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
20512
ac_cv_lib_cublas=ac_cv_lib_cublas_main
20514
unset ac_cv_lib_cublas_main
20515
if test "$have_valid_cuda" = "yes" ; then
20516
STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
20520
LDFLAGS="${SAVED_LDFLAGS}"
20523
if test "$__cuda_dir" != "no" ; then
20524
for __cuda_libdir in lib64 lib lib/x64 lib/Win32 ; do
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
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
20539
ac_check_lib_save_LIBS=$LIBS
20540
LIBS="-lcuda $LIBS"
20541
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20542
/* end confdefs.h. */
20553
if ac_fn_c_try_link "$LINENO"; then :
20554
ac_cv_lib_cuda_main=yes
20556
ac_cv_lib_cuda_main=no
20558
rm -f core conftest.err conftest.$ac_objext \
20559
conftest$ac_exeext conftest.$ac_ext
20560
LIBS=$ac_check_lib_save_LIBS
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
20569
ac_cv_lib_cuda=ac_cv_lib_cuda_main
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
20578
ac_check_lib_save_LIBS=$LIBS
20579
LIBS="-lcudart $LIBS"
20580
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20581
/* end confdefs.h. */
20592
if ac_fn_c_try_link "$LINENO"; then :
20593
ac_cv_lib_cudart_main=yes
20595
ac_cv_lib_cudart_main=no
20597
rm -f core conftest.err conftest.$ac_objext \
20598
conftest$ac_exeext conftest.$ac_ext
20599
LIBS=$ac_check_lib_save_LIBS
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
20608
ac_cv_lib_cudart=ac_cv_lib_cudart_main
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
20620
ac_check_lib_save_LIBS=$LIBS
20621
LIBS="-lcublas $LIBS"
20622
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20623
/* end confdefs.h. */
20634
if ac_fn_c_try_link "$LINENO"; then :
20635
ac_cv_lib_cublas_main=yes
20637
ac_cv_lib_cublas_main=no
20639
rm -f core conftest.err conftest.$ac_objext \
20640
conftest$ac_exeext conftest.$ac_ext
20641
LIBS=$ac_check_lib_save_LIBS
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
20650
ac_cv_lib_cublas=ac_cv_lib_cublas_main
20652
unset ac_cv_lib_cublas_main
20653
if test "$have_valid_cuda" = "yes" ; then
20654
STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
20658
LDFLAGS="${SAVED_LDFLAGS}"
20660
if test "$have_valid_cuda" = yes ; then
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
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
20679
ac_check_lib_save_LIBS=$LIBS
20680
LIBS="-lcuda $LIBS"
20681
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20682
/* end confdefs.h. */
20693
if ac_fn_c_try_link "$LINENO"; then :
20694
ac_cv_lib_cuda_main=yes
20696
ac_cv_lib_cuda_main=no
20698
rm -f core conftest.err conftest.$ac_objext \
20699
conftest$ac_exeext conftest.$ac_ext
20700
LIBS=$ac_check_lib_save_LIBS
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
20709
ac_cv_lib_cuda=ac_cv_lib_cuda_main
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
20718
ac_check_lib_save_LIBS=$LIBS
20719
LIBS="-lcudart $LIBS"
20720
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20721
/* end confdefs.h. */
20732
if ac_fn_c_try_link "$LINENO"; then :
20733
ac_cv_lib_cudart_main=yes
20735
ac_cv_lib_cudart_main=no
20737
rm -f core conftest.err conftest.$ac_objext \
20738
conftest$ac_exeext conftest.$ac_ext
20739
LIBS=$ac_check_lib_save_LIBS
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
20748
ac_cv_lib_cudart=ac_cv_lib_cudart_main
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
20760
ac_check_lib_save_LIBS=$LIBS
20761
LIBS="-lcublas $LIBS"
20762
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20763
/* end confdefs.h. */
20774
if ac_fn_c_try_link "$LINENO"; then :
20775
ac_cv_lib_cublas_main=yes
20777
ac_cv_lib_cublas_main=no
20779
rm -f core conftest.err conftest.$ac_objext \
20780
conftest$ac_exeext conftest.$ac_ext
20781
LIBS=$ac_check_lib_save_LIBS
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
20790
ac_cv_lib_cublas=ac_cv_lib_cublas_main
20792
unset ac_cv_lib_cublas_main
20793
if test "$have_valid_cuda" = "yes" ; then
20794
STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
20798
LDFLAGS="${SAVED_LDFLAGS}"
20804
if test "$have_valid_cuda" = "no" ; then
20805
CPPFLAGS="${SAVED_CPPFLAGS}"
20806
unset STARPU_CUDA_LDFLAGS
20808
if test "$__cuda_include_dir" != "no"; then
20809
STARPU_CUDA_CPPFLAGS="-I$__cuda_include_dir"
20810
NVCCFLAGS="${NVCCFLAGS} -I$__cuda_include_dir"
20814
if test "$have_valid_cuda" = "no" ; then
20816
__cuda_dir="$CUDA_PATH"
20817
__cuda_include_dir="$CUDA_INC_PATH"
20818
__cuda_lib_dir="$CUDA_LIB_PATH"
20820
if test -z "$__cuda_lib_dir" ; then
20823
if test -z "$__cuda_include_dir" ; then
20824
__cuda_include_dir=no
20826
if test -z "$__cuda_dir" ; then
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; }
20834
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CUDA is available" >&5
20835
$as_echo_n "checking whether CUDA is available... " >&6; }
20837
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
20840
if test "$__cuda_include_dir" = "no" -a "$__cuda_dir" != "no" ; then
20841
__cuda_include_dir="$__cuda_dir/include"
20844
SAVED_CPPFLAGS="$CPPFLAGS"
20847
if test "$__cuda_include_dir" != "no" ; then
20848
CPPFLAGS="${CPPFLAGS} -I$__cuda_include_dir"
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
20859
unset ac_cv_header_cuda_h
20861
if test "$have_valid_cuda" = "yes" ; then
20862
if test "$__cuda_lib_dir" != "no" ; then
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
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
20877
ac_check_lib_save_LIBS=$LIBS
20878
LIBS="-lcuda $LIBS"
20879
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20880
/* end confdefs.h. */
20891
if ac_fn_c_try_link "$LINENO"; then :
20892
ac_cv_lib_cuda_main=yes
20894
ac_cv_lib_cuda_main=no
20896
rm -f core conftest.err conftest.$ac_objext \
20897
conftest$ac_exeext conftest.$ac_ext
20898
LIBS=$ac_check_lib_save_LIBS
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
20907
ac_cv_lib_cuda=ac_cv_lib_cuda_main
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
20916
ac_check_lib_save_LIBS=$LIBS
20917
LIBS="-lcudart $LIBS"
20918
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20919
/* end confdefs.h. */
20930
if ac_fn_c_try_link "$LINENO"; then :
20931
ac_cv_lib_cudart_main=yes
20933
ac_cv_lib_cudart_main=no
20935
rm -f core conftest.err conftest.$ac_objext \
20936
conftest$ac_exeext conftest.$ac_ext
20937
LIBS=$ac_check_lib_save_LIBS
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
20946
ac_cv_lib_cudart=ac_cv_lib_cudart_main
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
20958
ac_check_lib_save_LIBS=$LIBS
20959
LIBS="-lcublas $LIBS"
20960
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20961
/* end confdefs.h. */
20972
if ac_fn_c_try_link "$LINENO"; then :
20973
ac_cv_lib_cublas_main=yes
20975
ac_cv_lib_cublas_main=no
20977
rm -f core conftest.err conftest.$ac_objext \
20978
conftest$ac_exeext conftest.$ac_ext
20979
LIBS=$ac_check_lib_save_LIBS
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
20988
ac_cv_lib_cublas=ac_cv_lib_cublas_main
20990
unset ac_cv_lib_cublas_main
20991
if test "$have_valid_cuda" = "yes" ; then
20992
STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
20996
LDFLAGS="${SAVED_LDFLAGS}"
20999
if test "$__cuda_dir" != "no" ; then
21000
for __cuda_libdir in lib64 lib lib/x64 lib/Win32 ; do
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
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
21015
ac_check_lib_save_LIBS=$LIBS
21016
LIBS="-lcuda $LIBS"
21017
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21018
/* end confdefs.h. */
21029
if ac_fn_c_try_link "$LINENO"; then :
21030
ac_cv_lib_cuda_main=yes
21032
ac_cv_lib_cuda_main=no
21034
rm -f core conftest.err conftest.$ac_objext \
21035
conftest$ac_exeext conftest.$ac_ext
21036
LIBS=$ac_check_lib_save_LIBS
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
21045
ac_cv_lib_cuda=ac_cv_lib_cuda_main
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
21054
ac_check_lib_save_LIBS=$LIBS
21055
LIBS="-lcudart $LIBS"
21056
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21057
/* end confdefs.h. */
21068
if ac_fn_c_try_link "$LINENO"; then :
21069
ac_cv_lib_cudart_main=yes
21071
ac_cv_lib_cudart_main=no
21073
rm -f core conftest.err conftest.$ac_objext \
21074
conftest$ac_exeext conftest.$ac_ext
21075
LIBS=$ac_check_lib_save_LIBS
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
21084
ac_cv_lib_cudart=ac_cv_lib_cudart_main
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
21096
ac_check_lib_save_LIBS=$LIBS
21097
LIBS="-lcublas $LIBS"
21098
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21099
/* end confdefs.h. */
21110
if ac_fn_c_try_link "$LINENO"; then :
21111
ac_cv_lib_cublas_main=yes
21113
ac_cv_lib_cublas_main=no
21115
rm -f core conftest.err conftest.$ac_objext \
21116
conftest$ac_exeext conftest.$ac_ext
21117
LIBS=$ac_check_lib_save_LIBS
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
21126
ac_cv_lib_cublas=ac_cv_lib_cublas_main
21128
unset ac_cv_lib_cublas_main
21129
if test "$have_valid_cuda" = "yes" ; then
21130
STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
21134
LDFLAGS="${SAVED_LDFLAGS}"
21136
if test "$have_valid_cuda" = yes ; then
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
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
21155
ac_check_lib_save_LIBS=$LIBS
21156
LIBS="-lcuda $LIBS"
21157
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21158
/* end confdefs.h. */
21169
if ac_fn_c_try_link "$LINENO"; then :
21170
ac_cv_lib_cuda_main=yes
21172
ac_cv_lib_cuda_main=no
21174
rm -f core conftest.err conftest.$ac_objext \
21175
conftest$ac_exeext conftest.$ac_ext
21176
LIBS=$ac_check_lib_save_LIBS
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
21185
ac_cv_lib_cuda=ac_cv_lib_cuda_main
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
21194
ac_check_lib_save_LIBS=$LIBS
21195
LIBS="-lcudart $LIBS"
21196
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21197
/* end confdefs.h. */
21208
if ac_fn_c_try_link "$LINENO"; then :
21209
ac_cv_lib_cudart_main=yes
21211
ac_cv_lib_cudart_main=no
21213
rm -f core conftest.err conftest.$ac_objext \
21214
conftest$ac_exeext conftest.$ac_ext
21215
LIBS=$ac_check_lib_save_LIBS
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
21224
ac_cv_lib_cudart=ac_cv_lib_cudart_main
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
21236
ac_check_lib_save_LIBS=$LIBS
21237
LIBS="-lcublas $LIBS"
21238
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21239
/* end confdefs.h. */
21250
if ac_fn_c_try_link "$LINENO"; then :
21251
ac_cv_lib_cublas_main=yes
21253
ac_cv_lib_cublas_main=no
21255
rm -f core conftest.err conftest.$ac_objext \
21256
conftest$ac_exeext conftest.$ac_ext
21257
LIBS=$ac_check_lib_save_LIBS
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
21266
ac_cv_lib_cublas=ac_cv_lib_cublas_main
21268
unset ac_cv_lib_cublas_main
21269
if test "$have_valid_cuda" = "yes" ; then
21270
STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
21274
LDFLAGS="${SAVED_LDFLAGS}"
21280
if test "$have_valid_cuda" = "no" ; then
21281
CPPFLAGS="${SAVED_CPPFLAGS}"
21282
unset STARPU_CUDA_LDFLAGS
21284
if test "$__cuda_include_dir" != "no"; then
21285
STARPU_CUDA_CPPFLAGS="-I$__cuda_include_dir"
21286
NVCCFLAGS="${NVCCFLAGS} -I$__cuda_include_dir"
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
20746
21296
__cuda_include_dir="no"
20747
21297
__cuda_lib_dir="no"
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
21302
if test -z "$__cuda_include_dir" ; then
21303
__cuda_include_dir=no
21305
if test -z "$__cuda_dir" ; then
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; }
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; }
20756
21316
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
20757
21317
$as_echo "" >&6; }
20785
21338
unset ac_cv_header_cuda_h
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"
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
20796
ac_check_lib_save_LIBS=$LIBS
20797
LIBS="-lcudart $LIBS"
20798
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20799
/* end confdefs.h. */
20810
if ac_fn_c_try_link "$LINENO"; then :
20811
ac_cv_lib_cudart_main=yes
20813
ac_cv_lib_cudart_main=no
20815
rm -f core conftest.err conftest.$ac_objext \
20816
conftest$ac_exeext conftest.$ac_ext
20817
LIBS=$ac_check_lib_save_LIBS
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
20826
ac_cv_lib_cudart=ac_cv_lib_cudart_main
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
20839
ac_check_lib_save_LIBS=$LIBS
20840
LIBS="-lcudart $LIBS"
20841
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20842
/* end confdefs.h. */
20853
if ac_fn_c_try_link "$LINENO"; then :
20854
ac_cv_lib_cudart_main=yes
20856
ac_cv_lib_cudart_main=no
20858
rm -f core conftest.err conftest.$ac_objext \
20859
conftest$ac_exeext conftest.$ac_ext
20860
LIBS=$ac_check_lib_save_LIBS
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
20869
ac_cv_lib_cudart=ac_cv_lib_cudart_main
20871
unset ac_cv_lib_cudart_main
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
20885
ac_check_lib_save_LIBS=$LIBS
20886
LIBS="-lcublas $LIBS"
20887
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20888
/* end confdefs.h. */
20899
if ac_fn_c_try_link "$LINENO"; then :
20900
ac_cv_lib_cublas_main=yes
20902
ac_cv_lib_cublas_main=no
20904
rm -f core conftest.err conftest.$ac_objext \
20905
conftest$ac_exeext conftest.$ac_ext
20906
LIBS=$ac_check_lib_save_LIBS
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
20915
ac_cv_lib_cublas=ac_cv_lib_cublas_main
20917
unset ac_cv_lib_cublas_main
20918
if test "$have_valid_cuda" = "yes" ; then
20919
STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
20923
CPPFLAGS="${SAVED_CPPFLAGS}"
20924
LDFLAGS="${SAVED_LDFLAGS}"
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"
20931
if test "$have_valid_cuda" = "yes" ; then
21341
if test "$__cuda_lib_dir" != "no" ; then
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
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
21356
ac_check_lib_save_LIBS=$LIBS
21357
LIBS="-lcuda $LIBS"
21358
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21359
/* end confdefs.h. */
21370
if ac_fn_c_try_link "$LINENO"; then :
21371
ac_cv_lib_cuda_main=yes
21373
ac_cv_lib_cuda_main=no
21375
rm -f core conftest.err conftest.$ac_objext \
21376
conftest$ac_exeext conftest.$ac_ext
21377
LIBS=$ac_check_lib_save_LIBS
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
21386
ac_cv_lib_cuda=ac_cv_lib_cuda_main
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
21395
ac_check_lib_save_LIBS=$LIBS
21396
LIBS="-lcudart $LIBS"
21397
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21398
/* end confdefs.h. */
21409
if ac_fn_c_try_link "$LINENO"; then :
21410
ac_cv_lib_cudart_main=yes
21412
ac_cv_lib_cudart_main=no
21414
rm -f core conftest.err conftest.$ac_objext \
21415
conftest$ac_exeext conftest.$ac_ext
21416
LIBS=$ac_check_lib_save_LIBS
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
21425
ac_cv_lib_cudart=ac_cv_lib_cudart_main
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
21437
ac_check_lib_save_LIBS=$LIBS
21438
LIBS="-lcublas $LIBS"
21439
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21440
/* end confdefs.h. */
21451
if ac_fn_c_try_link "$LINENO"; then :
21452
ac_cv_lib_cublas_main=yes
21454
ac_cv_lib_cublas_main=no
21456
rm -f core conftest.err conftest.$ac_objext \
21457
conftest$ac_exeext conftest.$ac_ext
21458
LIBS=$ac_check_lib_save_LIBS
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
21467
ac_cv_lib_cublas=ac_cv_lib_cublas_main
21469
unset ac_cv_lib_cublas_main
21470
if test "$have_valid_cuda" = "yes" ; then
21471
STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
21475
LDFLAGS="${SAVED_LDFLAGS}"
21478
if test "$__cuda_dir" != "no" ; then
21479
for __cuda_libdir in lib64 lib lib/x64 lib/Win32 ; do
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
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
21494
ac_check_lib_save_LIBS=$LIBS
21495
LIBS="-lcuda $LIBS"
21496
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21497
/* end confdefs.h. */
21508
if ac_fn_c_try_link "$LINENO"; then :
21509
ac_cv_lib_cuda_main=yes
21511
ac_cv_lib_cuda_main=no
21513
rm -f core conftest.err conftest.$ac_objext \
21514
conftest$ac_exeext conftest.$ac_ext
21515
LIBS=$ac_check_lib_save_LIBS
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
21524
ac_cv_lib_cuda=ac_cv_lib_cuda_main
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
21533
ac_check_lib_save_LIBS=$LIBS
21534
LIBS="-lcudart $LIBS"
21535
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21536
/* end confdefs.h. */
21547
if ac_fn_c_try_link "$LINENO"; then :
21548
ac_cv_lib_cudart_main=yes
21550
ac_cv_lib_cudart_main=no
21552
rm -f core conftest.err conftest.$ac_objext \
21553
conftest$ac_exeext conftest.$ac_ext
21554
LIBS=$ac_check_lib_save_LIBS
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
21563
ac_cv_lib_cudart=ac_cv_lib_cudart_main
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
21575
ac_check_lib_save_LIBS=$LIBS
21576
LIBS="-lcublas $LIBS"
21577
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21578
/* end confdefs.h. */
21589
if ac_fn_c_try_link "$LINENO"; then :
21590
ac_cv_lib_cublas_main=yes
21592
ac_cv_lib_cublas_main=no
21594
rm -f core conftest.err conftest.$ac_objext \
21595
conftest$ac_exeext conftest.$ac_ext
21596
LIBS=$ac_check_lib_save_LIBS
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
21605
ac_cv_lib_cublas=ac_cv_lib_cublas_main
21607
unset ac_cv_lib_cublas_main
21608
if test "$have_valid_cuda" = "yes" ; then
21609
STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
21613
LDFLAGS="${SAVED_LDFLAGS}"
21615
if test "$have_valid_cuda" = yes ; then
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
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
21634
ac_check_lib_save_LIBS=$LIBS
21635
LIBS="-lcuda $LIBS"
21636
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21637
/* end confdefs.h. */
21648
if ac_fn_c_try_link "$LINENO"; then :
21649
ac_cv_lib_cuda_main=yes
21651
ac_cv_lib_cuda_main=no
21653
rm -f core conftest.err conftest.$ac_objext \
21654
conftest$ac_exeext conftest.$ac_ext
21655
LIBS=$ac_check_lib_save_LIBS
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
21664
ac_cv_lib_cuda=ac_cv_lib_cuda_main
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
21673
ac_check_lib_save_LIBS=$LIBS
21674
LIBS="-lcudart $LIBS"
21675
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21676
/* end confdefs.h. */
21687
if ac_fn_c_try_link "$LINENO"; then :
21688
ac_cv_lib_cudart_main=yes
21690
ac_cv_lib_cudart_main=no
21692
rm -f core conftest.err conftest.$ac_objext \
21693
conftest$ac_exeext conftest.$ac_ext
21694
LIBS=$ac_check_lib_save_LIBS
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
21703
ac_cv_lib_cudart=ac_cv_lib_cudart_main
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
21715
ac_check_lib_save_LIBS=$LIBS
21716
LIBS="-lcublas $LIBS"
21717
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21718
/* end confdefs.h. */
21729
if ac_fn_c_try_link "$LINENO"; then :
21730
ac_cv_lib_cublas_main=yes
21732
ac_cv_lib_cublas_main=no
21734
rm -f core conftest.err conftest.$ac_objext \
21735
conftest$ac_exeext conftest.$ac_ext
21736
LIBS=$ac_check_lib_save_LIBS
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
21745
ac_cv_lib_cublas=ac_cv_lib_cublas_main
21747
unset ac_cv_lib_cublas_main
21748
if test "$have_valid_cuda" = "yes" ; then
21749
STARPU_CUDA_LDFLAGS="$STARPU_CUDA_LDFLAGS -lcublas"
21753
LDFLAGS="${SAVED_LDFLAGS}"
21759
if test "$have_valid_cuda" = "no" ; then
21760
CPPFLAGS="${SAVED_CPPFLAGS}"
21761
unset STARPU_CUDA_LDFLAGS
21763
if test "$__cuda_include_dir" != "no"; then
21764
STARPU_CUDA_CPPFLAGS="-I$__cuda_include_dir"
21765
NVCCFLAGS="${NVCCFLAGS} -I$__cuda_include_dir"
21769
if test "$have_valid_cuda" = "yes" ; then
20938
21776
# Check cuda is compatible with the C compiler