configure 759 KB
Newer Older
21001
21002
                break;
        fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21003

21004
21005
21006
21007
        PTHREAD_LIBS=""
        PTHREAD_CFLAGS=""
done
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21008

21009
21010
21011
21012
21013
21014
# Various other checks:
if test "x$acx_pthread_ok" = xyes; then
        save_LIBS="$LIBS"
        LIBS="$PTHREAD_LIBS $LIBS"
        save_CFLAGS="$CFLAGS"
        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21015

21016
21017
21018
21019
21020
        # Detect AIX lossage: threads are created detached by default
        # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
$as_echo_n "checking for joinable pthread attribute... " >&6; }
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21021
/* end confdefs.h.  */
21022
21023
21024
21025
21026
21027
21028
21029
#include <pthread.h>
int
main ()
{
int attr=PTHREAD_CREATE_JOINABLE;
  ;
  return 0;
}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21030
_ACEOF
21031
21032
if ac_fn_c_try_link "$LINENO"; then :
  ok=PTHREAD_CREATE_JOINABLE
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21033
else
21034
  ok=unknown
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21035
fi
21036
21037
21038
21039
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
        if test x"$ok" = xunknown; then
                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21040
/* end confdefs.h.  */
21041
21042
21043
21044
21045
21046
21047
21048
#include <pthread.h>
int
main ()
{
int attr=PTHREAD_CREATE_UNDETACHED;
  ;
  return 0;
}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21049
_ACEOF
21050
21051
if ac_fn_c_try_link "$LINENO"; then :
  ok=PTHREAD_CREATE_UNDETACHED
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21052
else
21053
  ok=unknown
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21054
fi
21055
21056
21057
21058
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
        fi
        if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21059

21060
$as_echo "#define PTHREAD_CREATE_JOINABLE \$ok" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21061

21062
21063
21064
21065
21066
21067
21068
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ok}" >&5
$as_echo "${ok}" >&6; }
        if test x"$ok" = xunknown; then
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: we do not know how to create joinable pthreads" >&5
$as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
        fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21069

21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5
$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
        flag=no
        case "${host_cpu}-${host_os}" in
                *-aix* | *-freebsd*)     flag="-D_THREAD_SAFE";;
                *solaris* | alpha*-osf*) flag="-D_REENTRANT";;
        esac
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5
$as_echo "${flag}" >&6; }
        if test "x$flag" != xno; then
                PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
        fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21082

21083
21084
        LIBS="$save_LIBS"
        CFLAGS="$save_CFLAGS"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21085

21086
21087
21088
21089
21090
21091
        # More AIX lossage: must compile with cc_r
        # Extract the first word of "cc_r", so it can be a program name with args.
set dummy cc_r; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_PTHREAD_CC+:} false; then :
21092
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21093
else
21094
21095
  if test -n "$PTHREAD_CC"; then
  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21096
else
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
    ac_cv_prog_PTHREAD_CC="cc_r"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21111

21112
  test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21113
fi
21114
21115
21116
21117
21118
fi
PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
if test -n "$PTHREAD_CC"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
$as_echo "$PTHREAD_CC" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21119
else
21120
21121
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21122
21123
21124
21125
fi


else
21126
        PTHREAD_CC="$CC"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21127
21128
21129
21130
21131
21132
fi





21133
21134
21135
21136
21137
21138
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$acx_pthread_ok" = xyes; then

$as_echo "#define HAVE_PTHREAD 1" >>confdefs.h

        :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21139
else
21140
        acx_pthread_ok=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21141
21142
21143
21144

fi


21145
21146
21147
21148
21149
21150
21151
  CC="$PTHREAD_CC"
  AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS -D_REENTRANT"
  LIBS="$PTHREAD_LIBS $LIBS"
fi
 if test $use_pthreads = "yes"; then
  USE_THREADS_TRUE=
  USE_THREADS_FALSE='#'
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21152
else
21153
21154
  USE_THREADS_TRUE='#'
  USE_THREADS_FALSE=
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21155
21156
21157
fi


21158
21159
21160
21161
################ handle the FFTW library (Fourier transforms) ################
if test "$use_model" = "yes"; then


Emmanuel Bertin's avatar
Emmanuel Bertin committed
21162

21163
21164
21165
21166
21167
21168
21169

acx_fftw_ok=no
if test x$fftw_incdir = x; then
  if test x$fftw_libdir = x; then
    ac_fn_c_check_header_mongrel "$LINENO" "fftw3.h" "ac_cv_header_fftw3_h" "$ac_includes_default"
if test "x$ac_cv_header_fftw3_h" = xyes; then :
  acx_fftw_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21170
fi
21171
21172
21173
21174
21175
21176
21177
21178
21179


    if test x$acx_fftw_ok = xyes; then

$as_echo "#define FFTW_H \"fftw3.h\"" >>confdefs.h

    else
      ac_fn_c_check_header_mongrel "$LINENO" "fftw/fftw3.h" "ac_cv_header_fftw_fftw3_h" "$ac_includes_default"
if test "x$ac_cv_header_fftw_fftw3_h" = xyes; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21180
21181
21182
21183
21184
21185
  acx_fftw_ok=yes
fi


      if test x$acx_fftw_ok = xyes; then

21186
$as_echo "#define FFTW_H \"fftw/fftw3.h\"" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21187
21188

      else
21189
        FFTW_ERROR="FFTW include files not found in default location!"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21190
21191
      fi
    fi
21192
21193
21194
21195
21196
  else
    as_ac_Header=`$as_echo "ac_cv_header_$fftw_libdir/include/fftw3.h" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$fftw_libdir/include/fftw3.h" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  acx_fftw_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21197
21198
21199
fi


21200
    if test x$acx_fftw_ok = xyes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21201

21202
$as_echo "#define FFTW_H \$fftw_libdir\"/include/fftw3.h" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21203

21204
21205
21206
21207
    else
      ac_fn_c_check_header_mongrel "$LINENO" "fftw3.h" "ac_cv_header_fftw3_h" "$ac_includes_default"
if test "x$ac_cv_header_fftw3_h" = xyes; then :
  acx_fftw_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21208
21209
21210
fi


21211
      if test x$acx_fftw_ok = xyes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21212

21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
$as_echo "#define FFTW_H \"fftw3.h\"" >>confdefs.h

      else
        FFTW_ERROR="FFTW include files not found in $fftw_libdir/include!"
      fi
    fi
  fi
else
  as_ac_Header=`$as_echo "ac_cv_header_$fftw_incdir/fftw3.h" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$fftw_incdir/fftw3.h" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21224
  acx_fftw_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21225
21226
21227
fi


Emmanuel Bertin's avatar
Emmanuel Bertin committed
21228
  if test x$acx_fftw_ok = xyes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21229

21230
cat >>confdefs.h <<_ACEOF
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21231
21232
21233
21234
21235
21236
21237
#define FFTW_H "$fftw_incdir/fftw3.h"
_ACEOF

  else
    FFTW_ERROR="FFTW include files not found in $fftw_incdir!"
  fi
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21238
21239


Emmanuel Bertin's avatar
Emmanuel Bertin committed
21240
21241
21242
FFTW_LIBS=""
OLIBS="$LIBS"
LIBS=""
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21243

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21244
21245
if test x$acx_fftw_ok = xyes; then
  if test x$fftw_libdir = x; then
21246
    if test xyes = xyes; then
21247
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftwf_execute in -lfftw3f" >&5
21248
$as_echo_n "checking for fftwf_execute in -lfftw3f... " >&6; }
21249
if ${ac_cv_lib_fftw3f_fftwf_execute+:} false; then :
21250
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21251
21252
else
  ac_check_lib_save_LIBS=$LIBS
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21253
LIBS="-lfftw3f -lm $LIBS"
21254
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21255
21256
/* end confdefs.h.  */

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21257
21258
21259
/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21260
21261
21262
#ifdef __cplusplus
extern "C"
#endif
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21263
char fftwf_execute ();
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21264
21265
21266
int
main ()
{
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21267
return fftwf_execute ();
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21268
21269
21270
21271
  ;
  return 0;
}
_ACEOF
21272
if ac_fn_c_try_link "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21273
  ac_cv_lib_fftw3f_fftwf_execute=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21274
else
21275
  ac_cv_lib_fftw3f_fftwf_execute=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21276
fi
21277
21278
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21279
21280
LIBS=$ac_check_lib_save_LIBS
fi
21281
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3f_fftwf_execute" >&5
21282
$as_echo "$ac_cv_lib_fftw3f_fftwf_execute" >&6; }
21283
if test "x$ac_cv_lib_fftw3f_fftwf_execute" = xyes; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21284
21285
21286
  acx_fftw_ok=yes
else
  acx_fftw_ok=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21287
21288
fi

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21289
      if test x$acx_fftw_ok = xyes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21290

21291
$as_echo "#define HAVE_FFTWF 1" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21292
21293
21294
21295
21296
21297

        FFTW_LIBS="-lfftw3f"
      else
        FFTW_ERROR="FFTW single precision library files not found at usual locations!"
      fi
    else
21298
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_execute in -lfftw3" >&5
21299
$as_echo_n "checking for fftw_execute in -lfftw3... " >&6; }
21300
if ${ac_cv_lib_fftw3_fftw_execute+:} false; then :
21301
21302
21303
21304
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3 -lm $LIBS"
21305
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char fftw_execute ();
int
main ()
{
return fftw_execute ();
  ;
  return 0;
}
_ACEOF
21323
if ac_fn_c_try_link "$LINENO"; then :
21324
21325
  ac_cv_lib_fftw3_fftw_execute=yes
else
21326
  ac_cv_lib_fftw3_fftw_execute=no
21327
fi
21328
21329
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
21330
21331
LIBS=$ac_check_lib_save_LIBS
fi
21332
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_execute" >&5
21333
$as_echo "$ac_cv_lib_fftw3_fftw_execute" >&6; }
21334
if test "x$ac_cv_lib_fftw3_fftw_execute" = xyes; then :
21335
21336
21337
21338
21339
21340
21341
  acx_fftw_ok=yes
else
  acx_fftw_ok=no
fi

      if test x$acx_fftw_ok = xyes; then

21342
$as_echo "#define HAVE_FFTW 1" >>confdefs.h
21343
21344
21345
21346
21347
21348
21349

        FFTW_LIBS="-lfftw3"
      else
        FFTW_ERROR="FFTW double precision library files not found at usual locations!"
      fi
    fi
    if test x$acx_fftw_ok = xyes && test x$use_pthreads = xyes; then
21350
      if test xyes = xyes; then
21351
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftwf_init_threads in -lfftw3f" >&5
21352
$as_echo_n "checking for fftwf_init_threads in -lfftw3f... " >&6; }
21353
if ${ac_cv_lib_fftw3f_fftwf_init_threads+:} false; then :
21354
21355
21356
21357
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3f -lm -lpthread $LIBS"
21358
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char fftwf_init_threads ();
int
main ()
{
return fftwf_init_threads ();
  ;
  return 0;
}
_ACEOF
21376
if ac_fn_c_try_link "$LINENO"; then :
21377
21378
  ac_cv_lib_fftw3f_fftwf_init_threads=yes
else
21379
  ac_cv_lib_fftw3f_fftwf_init_threads=no
21380
fi
21381
21382
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
21383
21384
LIBS=$ac_check_lib_save_LIBS
fi
21385
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3f_fftwf_init_threads" >&5
21386
$as_echo "$ac_cv_lib_fftw3f_fftwf_init_threads" >&6; }
21387
if test "x$ac_cv_lib_fftw3f_fftwf_init_threads" = xyes; then :
21388
21389
21390
21391
21392
21393
21394
  acx_fftwt_ok=yes
else
  acx_fftwt_ok=no
fi

        if test x$acx_fftwt_ok = xyes; then

21395
$as_echo "#define HAVE_FFTWF_MP 1" >>confdefs.h
21396
21397
21398

          FFTW_LIBS="-lfftw3f"
        else
21399
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftwf_init_threads in -lfftw3f_threads" >&5
21400
$as_echo_n "checking for fftwf_init_threads in -lfftw3f_threads... " >&6; }
21401
if ${ac_cv_lib_fftw3f_threads_fftwf_init_threads+:} false; then :
21402
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21403
else
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21404
  ac_check_lib_save_LIBS=$LIBS
21405
LIBS="-lfftw3f_threads -lfftw3f -lm -lpthread $LIBS"
21406
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21407
/* end confdefs.h.  */
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21408
21409
21410
21411
21412
21413

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21414
#endif
21415
char fftwf_init_threads ();
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21416
21417
21418
int
main ()
{
21419
return fftwf_init_threads ();
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21420
21421
21422
  ;
  return 0;
}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21423
_ACEOF
21424
if ac_fn_c_try_link "$LINENO"; then :
21425
  ac_cv_lib_fftw3f_threads_fftwf_init_threads=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21426
else
21427
  ac_cv_lib_fftw3f_threads_fftwf_init_threads=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21428
fi
21429
21430
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21431
21432
LIBS=$ac_check_lib_save_LIBS
fi
21433
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3f_threads_fftwf_init_threads" >&5
21434
$as_echo "$ac_cv_lib_fftw3f_threads_fftwf_init_threads" >&6; }
21435
if test "x$ac_cv_lib_fftw3f_threads_fftwf_init_threads" = xyes; then :
21436
  acx_fftwt_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21437
else
21438
  acx_fftwt_ok=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21439
21440
fi

21441
          if test x$acx_fftwt_ok = xyes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21442

21443
$as_echo "#define HAVE_FFTWF_MP 1" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21444

21445
21446
21447
21448
21449
21450
            FFTW_LIBS="-lfftw3f_threads -lfftw3f"
          else
            FFTW_WARN="FFTW single precision library was compiled without multithreading support!"

          fi
        fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21451
      else
21452
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_init_threads in -lfftw3" >&5
21453
$as_echo_n "checking for fftw_init_threads in -lfftw3... " >&6; }
21454
if ${ac_cv_lib_fftw3_fftw_init_threads+:} false; then :
21455
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21456
21457
else
  ac_check_lib_save_LIBS=$LIBS
21458
LIBS="-lfftw3 -lm -lpthread $LIBS"
21459
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21460
/* end confdefs.h.  */
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21461
21462
21463
21464
21465
21466
21467

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
21468
char fftw_init_threads ();
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21469
21470
21471
int
main ()
{
21472
return fftw_init_threads ();
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21473
21474
21475
  ;
  return 0;
}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21476
_ACEOF
21477
if ac_fn_c_try_link "$LINENO"; then :
21478
  ac_cv_lib_fftw3_fftw_init_threads=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21479
else
21480
  ac_cv_lib_fftw3_fftw_init_threads=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21481
fi
21482
21483
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21484
21485
LIBS=$ac_check_lib_save_LIBS
fi
21486
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_init_threads" >&5
21487
$as_echo "$ac_cv_lib_fftw3_fftw_init_threads" >&6; }
21488
if test "x$ac_cv_lib_fftw3_fftw_init_threads" = xyes; then :
21489
  acx_fftwt_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21490
else
21491
  acx_fftwt_ok=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21492
21493
fi

21494
        if test x$acx_fftwt_ok = xyes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21495

21496
$as_echo "#define HAVE_FFTW_MP 1" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21497

21498
          FFTW_LIBS="-lfftw3"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21499
        else
21500
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_init_threads in -lfftw3_threads" >&5
21501
$as_echo_n "checking for fftw_init_threads in -lfftw3_threads... " >&6; }
21502
if ${ac_cv_lib_fftw3_threads_fftw_init_threads+:} false; then :
21503
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21504
else
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21505
21506
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3_threads -lfftw3 -lm -lpthread $LIBS"
21507
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21508
/* end confdefs.h.  */
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21509
21510
21511
21512
21513
21514

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21515
#endif
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21516
21517
21518
21519
21520
21521
21522
21523
char fftw_init_threads ();
int
main ()
{
return fftw_init_threads ();
  ;
  return 0;
}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21524
_ACEOF
21525
if ac_fn_c_try_link "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21526
  ac_cv_lib_fftw3_threads_fftw_init_threads=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21527
else
21528
  ac_cv_lib_fftw3_threads_fftw_init_threads=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21529
fi
21530
21531
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21532
21533
LIBS=$ac_check_lib_save_LIBS
fi
21534
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_threads_fftw_init_threads" >&5
21535
$as_echo "$ac_cv_lib_fftw3_threads_fftw_init_threads" >&6; }
21536
if test "x$ac_cv_lib_fftw3_threads_fftw_init_threads" = xyes; then :
21537
  acx_fftwt_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21538
else
21539
  acx_fftwt_ok=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21540
21541
fi

21542
          if test x$acx_fftwt_ok = xyes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21543

21544
$as_echo "#define HAVE_FFTW_MP 1" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21545

21546
21547
21548
21549
21550
            FFTW_LIBS="-lfftw3_threads -lfftw3"
          else
            FFTW_WARN="FFTW double precision library was compiled without multithreading support!"

          fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21551
21552
21553
21554
        fi
      fi
    fi
  else
21555
    if test xyes = xyes; then
21556
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftwf_execute in -lfftw3f" >&5
21557
$as_echo_n "checking for fftwf_execute in -lfftw3f... " >&6; }
21558
if ${ac_cv_lib_fftw3f_fftwf_execute+:} false; then :
21559
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21560
21561
21562
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3f -L$fftw_libdir -lm $LIBS"
21563
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21564
/* end confdefs.h.  */
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21565
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char fftwf_execute ();
int
main ()
{
return fftwf_execute ();
  ;
  return 0;
}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21580
_ACEOF
21581
if ac_fn_c_try_link "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21582
  ac_cv_lib_fftw3f_fftwf_execute=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21583
else
21584
  ac_cv_lib_fftw3f_fftwf_execute=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21585
fi
21586
21587
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21588
LIBS=$ac_check_lib_save_LIBS
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21589
fi
21590
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3f_fftwf_execute" >&5
21591
$as_echo "$ac_cv_lib_fftw3f_fftwf_execute" >&6; }
21592
if test "x$ac_cv_lib_fftw3f_fftwf_execute" = xyes; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21593
  acx_fftw_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21594
else
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21595
  acx_fftw_ok=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21596
21597
fi

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21598
      if test x$acx_fftw_ok = xyes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21599

21600
$as_echo "#define HAVE_FFTWF 1" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21601
21602
21603
21604
21605
21606

        FFTW_LIBS="-L$fftw_libdir -lfftw3f"
      else
        FFTW_ERROR="FFTW single precision library files not found in $fftw_libdir!"
      fi
    else
21607
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_execute in -lfftw3" >&5
21608
$as_echo_n "checking for fftw_execute in -lfftw3... " >&6; }
21609
if ${ac_cv_lib_fftw3_fftw_execute+:} false; then :
21610
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21611
else
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21612
21613
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3 -L$fftw_libdir -lm $LIBS"
21614
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21615
21616
/* end confdefs.h.  */

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21617
21618
21619
21620
21621
21622
21623
/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char fftw_execute ();
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21624
21625
21626
int
main ()
{
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21627
return fftw_execute ();
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21628
21629
21630
21631
  ;
  return 0;
}
_ACEOF
21632
if ac_fn_c_try_link "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21633
  ac_cv_lib_fftw3_fftw_execute=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21634
else
21635
  ac_cv_lib_fftw3_fftw_execute=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21636
fi
21637
21638
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21639
21640
LIBS=$ac_check_lib_save_LIBS
fi
21641
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_execute" >&5
21642
$as_echo "$ac_cv_lib_fftw3_fftw_execute" >&6; }
21643
if test "x$ac_cv_lib_fftw3_fftw_execute" = xyes; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21644
  acx_fftw_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21645
else
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21646
  acx_fftw_ok=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21647
21648
fi

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21649
      if test x$acx_fftw_ok = xyes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21650

21651
$as_echo "#define HAVE_FFTW 1" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21652
21653
21654
21655
21656
21657
21658

        FFTW_LIBS="-L$fftw_libdir -lfftw3"
      else
        FFTW_ERROR="FFTW double precision library files not found in $fftw_libdir!"
      fi
    fi
    if test x$acx_fftw_ok = xyes && test x$use_pthreads = xyes; then
21659
      if test xyes = xyes; then
21660
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftwf_init_threads in -lfftw3f" >&5
21661
$as_echo_n "checking for fftwf_init_threads in -lfftw3f... " >&6; }
21662
if ${ac_cv_lib_fftw3f_fftwf_init_threads+:} false; then :
21663
21664
21665
21666
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3f -L$fftw_libdir -lm -lpthread $LIBS"
21667
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21668
21669
21670
21671
21672
21673
21674
21675
21676
/* end confdefs.h.  */

/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char fftwf_init_threads ();
21677
21678
21679
21680
21681
21682
21683
21684
21685
int
main ()
{
return fftwf_init_threads ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
21686
21687
  ac_cv_lib_fftw3f_fftwf_init_threads=yes
else
21688
  ac_cv_lib_fftw3f_fftwf_init_threads=no
21689
fi
21690
21691
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
21692
21693
LIBS=$ac_check_lib_save_LIBS
fi
21694
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3f_fftwf_init_threads" >&5
21695
$as_echo "$ac_cv_lib_fftw3f_fftwf_init_threads" >&6; }
21696
if test "x$ac_cv_lib_fftw3f_fftwf_init_threads" = xyes; then :
21697
21698
21699
21700
21701
21702
21703
  acx_fftwt_ok=yes
else
  acx_fftwt_ok=no
fi

        if test x$acx_fftwt_ok = xyes; then

21704
$as_echo "#define HAVE_FFTWF_MP 1" >>confdefs.h
21705
21706
21707

          FFTW_LIBS="-L$fftw_libdir -lfftw3f"
        else
21708
          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftwf_init_threads in -lfftw3f_threads" >&5
21709
$as_echo_n "checking for fftwf_init_threads in -lfftw3f_threads... " >&6; }
21710
if ${ac_cv_lib_fftw3f_threads_fftwf_init_threads+:} false; then :
21711
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21712
21713
21714
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3f_threads -L$fftw_libdir -lfftw3f -lm -lpthread $LIBS"
21715
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21716
21717
/* end confdefs.h.  */

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char fftwf_init_threads ();
int
main ()
{
return fftwf_init_threads ();
  ;
  return 0;
}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21732
_ACEOF
21733
if ac_fn_c_try_link "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21734
  ac_cv_lib_fftw3f_threads_fftwf_init_threads=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21735
else
21736
  ac_cv_lib_fftw3f_threads_fftwf_init_threads=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21737
fi
21738
21739
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21740
21741
LIBS=$ac_check_lib_save_LIBS
fi
21742
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3f_threads_fftwf_init_threads" >&5
21743
$as_echo "$ac_cv_lib_fftw3f_threads_fftwf_init_threads" >&6; }
21744
if test "x$ac_cv_lib_fftw3f_threads_fftwf_init_threads" = xyes; then :
21745
  acx_fftwt_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21746
else
21747
  acx_fftwt_ok=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21748
21749
fi

21750
          if test x$acx_fftwt_ok = xyes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21751

21752
$as_echo "#define HAVE_FFTWF_MP 1" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21753

21754
21755
21756
21757
21758
            FFTW_LIBS="-L$fftw_libdir -lfftw3f_threads -lfftw3f"
          else
            FFTW_WARN="FFTW single precision library in $fftw_libdir was compiled without multithreading support!"

          fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21759
21760
        fi
      else
21761
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_init_threads in -lfftw3_threads" >&5
21762
$as_echo_n "checking for fftw_init_threads in -lfftw3_threads... " >&6; }
21763
if ${ac_cv_lib_fftw3_threads_fftw_init_threads+:} false; then :
21764
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21765
else
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21766
21767
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3_threads -L$fftw_libdir -lfftw3 -lm -lpthread $LIBS"
21768
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21769
21770
/* end confdefs.h.  */

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21771
21772
21773
21774
21775
21776
21777
/* Override any GCC internal prototype to avoid an error.
   Use char because int might match the return type of a GCC
   builtin and then its argument prototype would still apply.  */
#ifdef __cplusplus
extern "C"
#endif
char fftw_init_threads ();
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21778
21779
21780
int
main ()
{
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21781
21782
21783
return fftw_init_threads ();
  ;
  return 0;
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21784
21785
}
_ACEOF
21786
if ac_fn_c_try_link "$LINENO"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21787
  ac_cv_lib_fftw3_threads_fftw_init_threads=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21788
else
21789
  ac_cv_lib_fftw3_threads_fftw_init_threads=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21790
fi
21791
21792
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21793
LIBS=$ac_check_lib_save_LIBS
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21794
fi
21795
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_threads_fftw_init_threads" >&5
21796
$as_echo "$ac_cv_lib_fftw3_threads_fftw_init_threads" >&6; }
21797
if test "x$ac_cv_lib_fftw3_threads_fftw_init_threads" = xyes; then :
21798
  acx_fftwt_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21799
else
21800
  acx_fftwt_ok=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21801
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21802

21803
        if test x$acx_fftwt_ok = xyes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21804

21805
$as_echo "#define HAVE_FFTW_MP 1" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21806

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21807
21808
          FFTW_LIBS="-L$fftw_libdir -lfftw3_threads -lfftw3"
        else
21809
21810
          FFTW_WARN="FFTW double precision library in $fftw_libdir was compiled without multithreading support!"

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21811
21812
21813
21814
        fi
      fi
    fi
  fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21815
21816
fi

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21817
21818
21819
21820
21821
21822
21823
21824
LIBS="$OLIBS"
if test x$acx_fftw_ok = xyes; then

  use_fftw=yes
else

  use_fftw=no
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21825
21826


21827
21828
21829
  if test "$use_fftw" = "yes"; then
    LIBS="$FFTW_LIBS $LIBS"
    if test "$FFTW_WARN" != ""; then
21830
      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $FFTW_WARN" >&5
21831
$as_echo "$as_me: WARNING: $FFTW_WARN" >&2;}
21832
21833
    fi
  else
21834
    as_fn_error $? "$FFTW_ERROR Exiting." "$LINENO" 5
21835
  fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21836
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21837

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21838
################## handle the ATLAS library(linear algebra) ##################
21839
if test "$use_model" = "yes"; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21840
21841
21842
21843




Emmanuel Bertin's avatar
Emmanuel Bertin committed
21844
21845
21846
acx_atlas_ok=no
if test x$atlas_incdir = x; then
  if test x$atlas_libdir = x; then
21847
21848
21849
21850
21851
    for ac_header in cblas.h clapack.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21852
  cat >>confdefs.h <<_ACEOF
21853
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21854
_ACEOF
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21855
 acx_atlas_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21856
21857
21858
21859
fi

done

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21860
    if test x$acx_atlas_ok = xyes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21861

21862
$as_echo "#define ATLAS_BLAS_H \"cblas.h\"" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21863
21864


21865
$as_echo "#define ATLAS_LAPACK_H \"clapack.h\"" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21866

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21867
    else
21868
21869
21870
21871
21872
      for ac_header in atlas/cblas.h atlas/clapack.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21873
  cat >>confdefs.h <<_ACEOF
21874
21875
21876
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
 acx_atlas_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21877
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21878

21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
done

      if test x$acx_atlas_ok = xyes; then

$as_echo "#define ATLAS_BLAS_H \"atlas/cblas.h\"" >>confdefs.h


$as_echo "#define ATLAS_LAPACK_H \"atlas/clapack.h\"" >>confdefs.h

      else
        atlas_def=/usr/local/atlas
        for ac_header in $atlas_def/include/cblas.h $atlas_def/include/clapack.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21895
  cat >>confdefs.h <<_ACEOF
21896
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21897
21898
_ACEOF
 acx_atlas_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21899
21900
fi

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21901
21902
21903
21904
21905
21906
done

        if test x$acx_atlas_ok = xyes; then

cat >>confdefs.h <<_ACEOF
#define ATLAS_BLAS_H "$atlas_def/include/cblas.h"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21907
21908
21909
_ACEOF


Emmanuel Bertin's avatar
Emmanuel Bertin committed
21910
21911
21912
21913
21914
21915
cat >>confdefs.h <<_ACEOF
#define ATLAS_LAPACK_H "$atlas_def/include/clapack.h"
_ACEOF

        else
          atlas_def=/usr/atlas
21916
21917
21918
21919
21920
          for ac_header in $atlas_def/include/cblas.h $atlas_def/include/clapack.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21921
  cat >>confdefs.h <<_ACEOF
21922
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
_ACEOF
 acx_atlas_ok=yes
fi

done

          if test x$acx_atlas_ok = xyes; then

cat >>confdefs.h <<_ACEOF
#define ATLAS_BLAS_H "$atlas_def/include/cblas.h"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define ATLAS_LAPACK_H "$atlas_def/include/clapack.h"
_ACEOF

          else
            ATLAS_ERROR="CBLAS/LAPack include files not found!"
          fi
        fi
      fi
    fi
  else
21947
21948
21949
21950
21951
    for ac_header in $atlas_libdir/include/cblas.h $atlas_libdir/include/clapack.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21952
  cat >>confdefs.h <<_ACEOF
21953
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21954
_ACEOF
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21955
 acx_atlas_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21956
21957
21958
21959
fi

done

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
    if test x$acx_atlas_ok = xyes; then

cat >>confdefs.h <<_ACEOF
#define ATLAS_BLAS_H "$atlas_libdir/include/cblas.h"
_ACEOF


cat >>confdefs.h <<_ACEOF
#define ATLAS_LAPACK_H "$atlas_libdir/include/clapack.h"
_ACEOF

    else
21972
21973
21974
21975
21976
      for ac_header in cblas.h clapack.h
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21977
  cat >>confdefs.h <<_ACEOF
21978
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21979
21980
_ACEOF
 acx_atlas_ok=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21981
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21982

21983
done
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21984

21985
21986
21987
21988
      if test x$acx_atlas_ok = xyes; then

cat >>confdefs.h <<_ACEOF
#define ATLAS_BLAS_H "cblas.h"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21989
21990
_ACEOF

Emmanuel Bertin's avatar
Emmanuel Bertin committed
21991

21992
21993
21994
cat >>confdefs.h <<_ACEOF
#define ATLAS_LAPACK_H "clapack.h"
_ACEOF
Emmanuel Bertin's avatar
Emmanuel Bertin committed
21995

21996
21997
21998
21999
22000
      else
        ATLAS_ERROR="CBLAS/LAPack include files not found in $atlas_libdir/include!"
      fi
    fi
  fi
For faster browsing, not all history is shown. View entire blame