Newer
Older
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# 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"
# 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
#include <pthread.h>
int
main ()
{
int attr=PTHREAD_CREATE_JOINABLE;
;
return 0;
}
if ac_fn_c_try_link "$LINENO"; then :
ok=PTHREAD_CREATE_JOINABLE
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
#include <pthread.h>
int
main ()
{
int attr=PTHREAD_CREATE_UNDETACHED;
;
return 0;
}
if ac_fn_c_try_link "$LINENO"; then :
ok=PTHREAD_CREATE_UNDETACHED
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
$as_echo "#define PTHREAD_CREATE_JOINABLE \$ok" >>confdefs.h
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
{ $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
LIBS="$save_LIBS"
CFLAGS="$save_CFLAGS"
# 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 :
Emmanuel Bertin
committed
$as_echo_n "(cached) " >&6
if test -n "$PTHREAD_CC"; then
ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
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
test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
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; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
# 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
:
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='#'
USE_THREADS_TRUE='#'
USE_THREADS_FALSE=
################ handle the FFTW library (Fourier transforms) ################
if test "$use_model" = "yes"; then
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
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 :
acx_fftw_ok=yes
fi
if test x$acx_fftw_ok = xyes; then
$as_echo "#define FFTW_H \"fftw/fftw3.h\"" >>confdefs.h
FFTW_ERROR="FFTW include files not found in default location!"
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
$as_echo "#define FFTW_H \$fftw_libdir\"/include/fftw3.h" >>confdefs.h
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
$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 :
cat >>confdefs.h <<_ACEOF
#define FFTW_H "$fftw_incdir/fftw3.h"
_ACEOF
else
FFTW_ERROR="FFTW include files not found in $fftw_incdir!"
fi
fi
FFTW_LIBS=""
OLIBS="$LIBS"
LIBS=""
if test x$acx_fftw_ok = xyes; then
if test x$fftw_libdir = x; then
if test xyes = xyes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftwf_execute in -lfftw3f" >&5
Emmanuel Bertin
committed
$as_echo_n "checking for fftwf_execute in -lfftw3f... " >&6; }
if ${ac_cv_lib_fftw3f_fftwf_execute+:} false; then :
Emmanuel Bertin
committed
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
if ac_fn_c_try_link "$LINENO"; then :
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3f_fftwf_execute" >&5
Emmanuel Bertin
committed
$as_echo "$ac_cv_lib_fftw3f_fftwf_execute" >&6; }
if test "x$ac_cv_lib_fftw3f_fftwf_execute" = xyes; then :
acx_fftw_ok=yes
else
acx_fftw_ok=no
$as_echo "#define HAVE_FFTWF 1" >>confdefs.h
FFTW_LIBS="-lfftw3f"
else
FFTW_ERROR="FFTW single precision library files not found at usual locations!"
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_execute in -lfftw3" >&5
Emmanuel Bertin
committed
$as_echo_n "checking for fftw_execute in -lfftw3... " >&6; }
if ${ac_cv_lib_fftw3_fftw_execute+:} false; then :
Emmanuel Bertin
committed
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3 -lm $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin
committed
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
if ac_fn_c_try_link "$LINENO"; then :
Emmanuel Bertin
committed
ac_cv_lib_fftw3_fftw_execute=yes
else
Emmanuel Bertin
committed
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
Emmanuel Bertin
committed
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_execute" >&5
Emmanuel Bertin
committed
$as_echo "$ac_cv_lib_fftw3_fftw_execute" >&6; }
if test "x$ac_cv_lib_fftw3_fftw_execute" = xyes; then :
Emmanuel Bertin
committed
acx_fftw_ok=yes
else
acx_fftw_ok=no
fi
if test x$acx_fftw_ok = xyes; then
$as_echo "#define HAVE_FFTW 1" >>confdefs.h
Emmanuel Bertin
committed
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
if test xyes = xyes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftwf_init_threads in -lfftw3f" >&5
Emmanuel Bertin
committed
$as_echo_n "checking for fftwf_init_threads in -lfftw3f... " >&6; }
if ${ac_cv_lib_fftw3f_fftwf_init_threads+:} false; then :
Emmanuel Bertin
committed
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3f -lm -lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin
committed
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
if ac_fn_c_try_link "$LINENO"; then :
Emmanuel Bertin
committed
ac_cv_lib_fftw3f_fftwf_init_threads=yes
else
ac_cv_lib_fftw3f_fftwf_init_threads=no
Emmanuel Bertin
committed
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
Emmanuel Bertin
committed
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3f_fftwf_init_threads" >&5
Emmanuel Bertin
committed
$as_echo "$ac_cv_lib_fftw3f_fftwf_init_threads" >&6; }
if test "x$ac_cv_lib_fftw3f_fftwf_init_threads" = xyes; then :
Emmanuel Bertin
committed
acx_fftwt_ok=yes
else
acx_fftwt_ok=no
fi
if test x$acx_fftwt_ok = xyes; then
$as_echo "#define HAVE_FFTWF_MP 1" >>confdefs.h
Emmanuel Bertin
committed
FFTW_LIBS="-lfftw3f"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftwf_init_threads in -lfftw3f_threads" >&5
Emmanuel Bertin
committed
$as_echo_n "checking for fftwf_init_threads in -lfftw3f_threads... " >&6; }
if ${ac_cv_lib_fftw3f_threads_fftwf_init_threads+:} false; then :
Emmanuel Bertin
committed
$as_echo_n "(cached) " >&6
Emmanuel Bertin
committed
LIBS="-lfftw3f_threads -lfftw3f -lm -lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
committed
char fftwf_init_threads ();
Emmanuel Bertin
committed
return fftwf_init_threads ();
if ac_fn_c_try_link "$LINENO"; then :
Emmanuel Bertin
committed
ac_cv_lib_fftw3f_threads_fftwf_init_threads=yes
ac_cv_lib_fftw3f_threads_fftwf_init_threads=no
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3f_threads_fftwf_init_threads" >&5
Emmanuel Bertin
committed
$as_echo "$ac_cv_lib_fftw3f_threads_fftwf_init_threads" >&6; }
if test "x$ac_cv_lib_fftw3f_threads_fftwf_init_threads" = xyes; then :
Emmanuel Bertin
committed
acx_fftwt_ok=yes
Emmanuel Bertin
committed
acx_fftwt_ok=no
Emmanuel Bertin
committed
if test x$acx_fftwt_ok = xyes; then
$as_echo "#define HAVE_FFTWF_MP 1" >>confdefs.h
Emmanuel Bertin
committed
FFTW_LIBS="-lfftw3f_threads -lfftw3f"
else
FFTW_WARN="FFTW single precision library was compiled without multithreading support!"
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_init_threads in -lfftw3" >&5
Emmanuel Bertin
committed
$as_echo_n "checking for fftw_init_threads in -lfftw3... " >&6; }
if ${ac_cv_lib_fftw3_fftw_init_threads+:} false; then :
Emmanuel Bertin
committed
$as_echo_n "(cached) " >&6
Emmanuel Bertin
committed
LIBS="-lfftw3 -lm -lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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
Emmanuel Bertin
committed
char fftw_init_threads ();
Emmanuel Bertin
committed
return fftw_init_threads ();
if ac_fn_c_try_link "$LINENO"; then :
Emmanuel Bertin
committed
ac_cv_lib_fftw3_fftw_init_threads=yes
ac_cv_lib_fftw3_fftw_init_threads=no
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_init_threads" >&5
Emmanuel Bertin
committed
$as_echo "$ac_cv_lib_fftw3_fftw_init_threads" >&6; }
if test "x$ac_cv_lib_fftw3_fftw_init_threads" = xyes; then :
Emmanuel Bertin
committed
acx_fftwt_ok=yes
Emmanuel Bertin
committed
acx_fftwt_ok=no
Emmanuel Bertin
committed
if test x$acx_fftwt_ok = xyes; then
$as_echo "#define HAVE_FFTW_MP 1" >>confdefs.h
Emmanuel Bertin
committed
FFTW_LIBS="-lfftw3"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_init_threads in -lfftw3_threads" >&5
Emmanuel Bertin
committed
$as_echo_n "checking for fftw_init_threads in -lfftw3_threads... " >&6; }
if ${ac_cv_lib_fftw3_threads_fftw_init_threads+:} false; then :
Emmanuel Bertin
committed
$as_echo_n "(cached) " >&6
ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3_threads -lfftw3 -lm -lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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"
char fftw_init_threads ();
int
main ()
{
return fftw_init_threads ();
;
return 0;
}
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_fftw3_threads_fftw_init_threads=yes
ac_cv_lib_fftw3_threads_fftw_init_threads=no
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_threads_fftw_init_threads" >&5
Emmanuel Bertin
committed
$as_echo "$ac_cv_lib_fftw3_threads_fftw_init_threads" >&6; }
if test "x$ac_cv_lib_fftw3_threads_fftw_init_threads" = xyes; then :
Emmanuel Bertin
committed
acx_fftwt_ok=yes
Emmanuel Bertin
committed
acx_fftwt_ok=no
Emmanuel Bertin
committed
if test x$acx_fftwt_ok = xyes; then
$as_echo "#define HAVE_FFTW_MP 1" >>confdefs.h
Emmanuel Bertin
committed
FFTW_LIBS="-lfftw3_threads -lfftw3"
else
FFTW_WARN="FFTW double precision library was compiled without multithreading support!"
fi
if test xyes = xyes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftwf_execute in -lfftw3f" >&5
Emmanuel Bertin
committed
$as_echo_n "checking for fftwf_execute in -lfftw3f... " >&6; }
if ${ac_cv_lib_fftw3f_fftwf_execute+:} false; then :
Emmanuel Bertin
committed
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3f -L$fftw_libdir -lm $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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;
}
if ac_fn_c_try_link "$LINENO"; then :
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3f_fftwf_execute" >&5
Emmanuel Bertin
committed
$as_echo "$ac_cv_lib_fftw3f_fftwf_execute" >&6; }
if test "x$ac_cv_lib_fftw3f_fftwf_execute" = xyes; then :
$as_echo "#define HAVE_FFTWF 1" >>confdefs.h
FFTW_LIBS="-L$fftw_libdir -lfftw3f"
else
FFTW_ERROR="FFTW single precision library files not found in $fftw_libdir!"
fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_execute in -lfftw3" >&5
Emmanuel Bertin
committed
$as_echo_n "checking for fftw_execute in -lfftw3... " >&6; }
if ${ac_cv_lib_fftw3_fftw_execute+:} false; then :
Emmanuel Bertin
committed
$as_echo_n "(cached) " >&6
ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3 -L$fftw_libdir -lm $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 ();
if ac_fn_c_try_link "$LINENO"; then :
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_execute" >&5
Emmanuel Bertin
committed
$as_echo "$ac_cv_lib_fftw3_fftw_execute" >&6; }
if test "x$ac_cv_lib_fftw3_fftw_execute" = xyes; then :
$as_echo "#define HAVE_FFTW 1" >>confdefs.h
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
if test xyes = xyes; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftwf_init_threads in -lfftw3f" >&5
Emmanuel Bertin
committed
$as_echo_n "checking for fftwf_init_threads in -lfftw3f... " >&6; }
if ${ac_cv_lib_fftw3f_fftwf_init_threads+:} false; then :
Emmanuel Bertin
committed
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3f -L$fftw_libdir -lm -lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Emmanuel Bertin
committed
/* 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
if ac_fn_c_try_link "$LINENO"; then :
Emmanuel Bertin
committed
ac_cv_lib_fftw3f_fftwf_init_threads=yes
else
ac_cv_lib_fftw3f_fftwf_init_threads=no
Emmanuel Bertin
committed
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
Emmanuel Bertin
committed
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3f_fftwf_init_threads" >&5
Emmanuel Bertin
committed
$as_echo "$ac_cv_lib_fftw3f_fftwf_init_threads" >&6; }
if test "x$ac_cv_lib_fftw3f_fftwf_init_threads" = xyes; then :
Emmanuel Bertin
committed
acx_fftwt_ok=yes
else
acx_fftwt_ok=no
fi
if test x$acx_fftwt_ok = xyes; then
$as_echo "#define HAVE_FFTWF_MP 1" >>confdefs.h
Emmanuel Bertin
committed
FFTW_LIBS="-L$fftw_libdir -lfftw3f"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftwf_init_threads in -lfftw3f_threads" >&5
Emmanuel Bertin
committed
$as_echo_n "checking for fftwf_init_threads in -lfftw3f_threads... " >&6; }
if ${ac_cv_lib_fftw3f_threads_fftwf_init_threads+:} false; then :
Emmanuel Bertin
committed
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3f_threads -L$fftw_libdir -lfftw3f -lm -lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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;
}
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_fftw3f_threads_fftwf_init_threads=yes
ac_cv_lib_fftw3f_threads_fftwf_init_threads=no
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3f_threads_fftwf_init_threads" >&5
Emmanuel Bertin
committed
$as_echo "$ac_cv_lib_fftw3f_threads_fftwf_init_threads" >&6; }
if test "x$ac_cv_lib_fftw3f_threads_fftwf_init_threads" = xyes; then :
Emmanuel Bertin
committed
acx_fftwt_ok=yes
Emmanuel Bertin
committed
acx_fftwt_ok=no
Emmanuel Bertin
committed
if test x$acx_fftwt_ok = xyes; then
$as_echo "#define HAVE_FFTWF_MP 1" >>confdefs.h
Emmanuel Bertin
committed
FFTW_LIBS="-L$fftw_libdir -lfftw3f_threads -lfftw3f"
else
FFTW_WARN="FFTW single precision library in $fftw_libdir was compiled without multithreading support!"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_init_threads in -lfftw3_threads" >&5
Emmanuel Bertin
committed
$as_echo_n "checking for fftw_init_threads in -lfftw3_threads... " >&6; }
if ${ac_cv_lib_fftw3_threads_fftw_init_threads+:} false; then :
Emmanuel Bertin
committed
$as_echo_n "(cached) " >&6
ac_check_lib_save_LIBS=$LIBS
LIBS="-lfftw3_threads -L$fftw_libdir -lfftw3 -lm -lpthread $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* 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 ();
return fftw_init_threads ();
;
return 0;
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_fftw3_threads_fftw_init_threads=yes
ac_cv_lib_fftw3_threads_fftw_init_threads=no
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_threads_fftw_init_threads" >&5
Emmanuel Bertin
committed
$as_echo "$ac_cv_lib_fftw3_threads_fftw_init_threads" >&6; }
if test "x$ac_cv_lib_fftw3_threads_fftw_init_threads" = xyes; then :
Emmanuel Bertin
committed
acx_fftwt_ok=yes
Emmanuel Bertin
committed
acx_fftwt_ok=no
Emmanuel Bertin
committed
if test x$acx_fftwt_ok = xyes; then
$as_echo "#define HAVE_FFTW_MP 1" >>confdefs.h
FFTW_LIBS="-L$fftw_libdir -lfftw3_threads -lfftw3"
else
Emmanuel Bertin
committed
FFTW_WARN="FFTW double precision library in $fftw_libdir was compiled without multithreading support!"
LIBS="$OLIBS"
if test x$acx_fftw_ok = xyes; then
use_fftw=yes
else
use_fftw=no
fi
Emmanuel Bertin
committed
if test "$use_fftw" = "yes"; then
LIBS="$FFTW_LIBS $LIBS"
if test "$FFTW_WARN" != ""; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $FFTW_WARN" >&5
Emmanuel Bertin
committed
$as_echo "$as_me: WARNING: $FFTW_WARN" >&2;}
Emmanuel Bertin
committed
fi
else
as_fn_error $? "$FFTW_ERROR Exiting." "$LINENO" 5
Emmanuel Bertin
committed
fi
################## handle the ATLAS library(linear algebra) ##################
Emmanuel Bertin
committed
if test "$use_model" = "yes"; then
acx_atlas_ok=no
if test x$atlas_incdir = x; then
if test x$atlas_libdir = x; then
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
committed
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
$as_echo "#define ATLAS_BLAS_H \"cblas.h\"" >>confdefs.h
$as_echo "#define ATLAS_LAPACK_H \"clapack.h\"" >>confdefs.h
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 :
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
acx_atlas_ok=yes
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
committed
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
done
if test x$acx_atlas_ok = xyes; then
cat >>confdefs.h <<_ACEOF
#define ATLAS_BLAS_H "$atlas_def/include/cblas.h"
cat >>confdefs.h <<_ACEOF
#define ATLAS_LAPACK_H "$atlas_def/include/clapack.h"
_ACEOF
else
atlas_def=/usr/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
committed
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
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
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
committed
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
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
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
committed
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
if test x$acx_atlas_ok = xyes; then
cat >>confdefs.h <<_ACEOF
#define ATLAS_BLAS_H "cblas.h"
cat >>confdefs.h <<_ACEOF
#define ATLAS_LAPACK_H "clapack.h"
_ACEOF
else
ATLAS_ERROR="CBLAS/LAPack include files not found in $atlas_libdir/include!"
fi
fi
fi