configure 898 KB
Newer Older
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014

cat >>confdefs.h <<\_ACEOF
#define USE_THREADS 1
_ACEOF

# CC, CFLAGS and LIBS are system and compiler-dependent


acx_pthread_ok=no

# First, check if the POSIX threads header, pthread.h, is available.
# If it isn't, don't bother looking for the threads libraries.
# AC_CHECK_HEADER(pthread.h, , acx_pthread_ok=noheader)
if test "${ac_cv_header_pthread_h+set}" = set; then
23015
23016
  { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
$as_echo_n "checking for pthread.h... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23017
if test "${ac_cv_header_pthread_h+set}" = set; then
23018
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23019
fi
23020
23021
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
$as_echo "$ac_cv_header_pthread_h" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23022
23023
else
  # Is the header compilable?
23024
23025
{ $as_echo "$as_me:$LINENO: checking pthread.h usability" >&5
$as_echo_n "checking pthread.h usability... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <pthread.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
23041
23042
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23043
23044
23045
23046
23047
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
23048
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23049
23050
23051
23052
23053
23054
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
23055
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23056
23057
23058
23059
23060
23061
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23062
23063
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23064
23065

# Is the header present?
23066
23067
{ $as_echo "$as_me:$LINENO: checking pthread.h presence" >&5
$as_echo_n "checking pthread.h presence... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <pthread.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
23081
23082
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23083
23084
23085
23086
23087
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
23088
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23089
23090
23091
23092
23093
23094
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
23095
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23096
23097
23098
23099
23100
23101
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
23102
23103
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23104
23105
23106
23107

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
23108
23109
23110
23111
    { $as_echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23112
23113
23114
    ac_header_preproc=yes
    ;;
  no:yes:* )
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
    { $as_echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: pthread.h:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: pthread.h:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: pthread.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
$as_echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23127
23128
23129
23130
23131
23132
23133
23134
    ( cat <<\_ASBOX
## ---------------------------- ##
## Report this to bertin@iap.fr ##
## ---------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
23135
23136
{ $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
$as_echo_n "checking for pthread.h... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23137
if test "${ac_cv_header_pthread_h+set}" = set; then
23138
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23139
23140
23141
else
  ac_cv_header_pthread_h=$ac_header_preproc
fi
23142
23143
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
$as_echo "$ac_cv_header_pthread_h" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23144
23145

fi
23146
if test "x$ac_cv_header_pthread_h" = x""yes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23147
23148
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164
23165
23166
  :
else
  acx_pthread_ok=no
fi



# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).

# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
        save_CFLAGS="$CFLAGS"
        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
        save_LIBS="$LIBS"
        LIBS="$PTHREAD_LIBS $LIBS"
23167
23168
        { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
        cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* 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 pthread_join ();
int
main ()
{
return pthread_join ();
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
23197
23198
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23199
23200
23201
23202
23203
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
23204
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23205
23206
23207
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
23208
23209
23210
23211
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23212
23213
  acx_pthread_ok=yes
else
23214
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23215
23216
23217
23218
23219
sed 's/^/| /' conftest.$ac_ext >&5


fi

23220
rm -rf conftest.dSYM
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23221
23222
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
23223
23224
        { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
$as_echo "$acx_pthread_ok" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23225
23226
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
        if test x"$acx_pthread_ok" = xno; then
                PTHREAD_LIBS=""
                PTHREAD_CFLAGS=""
        fi
        LIBS="$save_LIBS"
        CFLAGS="$save_CFLAGS"
fi

# Create a list of thread flags to try.  Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all.

acx_pthread_flags="pthreads none -Kthread -kthread lthread pthread -pthread -pthreads -mthreads --thread-safe -mt"

# The ordering *is* (sometimes) important.  Some notes on the
# individual items follow:

# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
#       other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
# -pthreads: Solaris/gcc
# -mthreads: Mingw32/gcc, Lynx/gcc
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
#      doesn't hurt to check since this sometimes defines pthreads too;
#      also defines -D_REENTRANT)
# pthread: Linux, etcetera
# --thread-safe: KAI C++

case "${host_cpu}-${host_os}" in
        *solaris*)

        # On Solaris (at least, for some versions), libc contains stubbed
        # (non-functional) versions of the pthreads routines, so link-based
        # tests will erroneously succeed.  (We need to link with -pthread or
        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
        # a function called by this macro, so we could check for that, but
        # who knows whether they'll stub that too in a future libc.)  So,
        # we'll just look for -pthreads and -lpthread first:

        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
        ;;
esac

if test x"$acx_pthread_ok" = xno; then
for flag in $acx_pthread_flags; do

        case $flag in
                none)
23277
23278
                { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
$as_echo_n "checking whether pthreads work without any flags... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23279
23280
23281
                ;;

                -*)
23282
23283
                { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
$as_echo_n "checking whether pthreads work with $flag... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23284
23285
23286
23287
                PTHREAD_CFLAGS="$flag"
                ;;

                *)
23288
23289
                { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23290
23291
23292
23293
23294
23295
23296
23297
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313
23314
23315
23316
23317
23318
23319
23320
23321
23322
23323
23324
23325
23326
23327
23328
23329
23330
                PTHREAD_LIBS="-l$flag"
                ;;
        esac

        save_LIBS="$LIBS"
        save_CFLAGS="$CFLAGS"
        LIBS="$PTHREAD_LIBS $LIBS"
        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"

        # Check for various functions.  We must include pthread.h,
        # since some functions may be macros.  (On the Sequent, we
        # need a special flag -Kthread to make this header compile.)
        # We check for pthread_join because it is in -lpthread on IRIX
        # while pthread_create is in libc.  We check for pthread_attr_init
        # due to DEC craziness with -lpthreads.  We check for
        # pthread_cleanup_push because it is one of the few pthread
        # functions on Solaris that doesn't have a non-functional libc stub.
        # We try pthread_create on general principles.
        cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <pthread.h>
int
main ()
{
pthread_t th; pthread_join(th, 0);
                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
                     pthread_create(0,0,0,0); pthread_cleanup_pop(0);
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
23331
23332
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23333
23334
23335
23336
23337
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
23338
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23339
23340
23341
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
23342
23343
23344
23345
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23346
23347
  acx_pthread_ok=yes
else
23348
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23349
23350
23351
23352
23353
sed 's/^/| /' conftest.$ac_ext >&5


fi

23354
rm -rf conftest.dSYM
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23355
23356
23357
23358
23359
23360
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext

        LIBS="$save_LIBS"
        CFLAGS="$save_CFLAGS"

23361
23362
        { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
$as_echo "$acx_pthread_ok" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23363
23364
23365
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
        if test "x$acx_pthread_ok" = xyes; then
                break;
        fi

        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).
23381
23382
        { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
$as_echo_n "checking for joinable pthread attribute... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23383
23384
23385
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395
23396
23397
23398
23399
23400
23401
23402
23403
        cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <pthread.h>
int
main ()
{
int attr=PTHREAD_CREATE_JOINABLE;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
23404
23405
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23406
23407
23408
23409
23410
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
23411
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23412
23413
23414
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
23415
23416
23417
23418
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23419
23420
  ok=PTHREAD_CREATE_JOINABLE
else
23421
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23422
23423
23424
23425
23426
sed 's/^/| /' conftest.$ac_ext >&5

	ok=unknown
fi

23427
rm -rf conftest.dSYM
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444
23445
23446
23447
23448
23449
23450
23451
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
        if test x"$ok" = xunknown; then
                cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <pthread.h>
int
main ()
{
int attr=PTHREAD_CREATE_UNDETACHED;
  ;
  return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
23452
23453
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23454
23455
23456
23457
23458
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
23459
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23460
23461
23462
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
23463
23464
23465
23466
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23467
23468
  ok=PTHREAD_CREATE_UNDETACHED
else
23469
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23470
23471
23472
23473
23474
sed 's/^/| /' conftest.$ac_ext >&5

	ok=unknown
fi

23475
rm -rf conftest.dSYM
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
        fi
        if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then

cat >>confdefs.h <<\_ACEOF
#define PTHREAD_CREATE_JOINABLE $ok
_ACEOF

        fi
23486
23487
        { $as_echo "$as_me:$LINENO: result: ${ok}" >&5
$as_echo "${ok}" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23488
        if test x"$ok" = xunknown; then
23489
23490
                { $as_echo "$as_me:$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;}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23491
23492
        fi

23493
23494
        { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23495
23496
23497
23498
23499
        flag=no
        case "${host_cpu}-${host_os}" in
                *-aix* | *-freebsd*)     flag="-D_THREAD_SAFE";;
                *solaris* | alpha*-osf*) flag="-D_REENTRANT";;
        esac
23500
23501
        { $as_echo "$as_me:$LINENO: result: ${flag}" >&5
$as_echo "${flag}" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
        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
23512
23513
{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23514
if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
23515
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23516
23517
23518
23519
23520
23521
23522
23523
23524
23525
23526
23527
else
  if test -n "$PTHREAD_CC"; then
  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
else
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"
23528
    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23529
23530
23531
23532
23533
23534
23535
23536
23537
23538
23539
    break 2
  fi
done
done
IFS=$as_save_IFS

  test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
fi
fi
PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
if test -n "$PTHREAD_CC"; then
23540
23541
  { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
$as_echo "$PTHREAD_CC" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23542
else
23543
23544
  { $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23545
23546
23547
23548
23549
23550
23551
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
23568
23569
23570
23571
23572
23573
23574
23575
23576
23577
23578
23579
23580
23581
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
fi


else
        PTHREAD_CC="$CC"
fi





# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test x"$acx_pthread_ok" = xyes; then

cat >>confdefs.h <<\_ACEOF
#define HAVE_PTHREAD 1
_ACEOF

        :
else
        acx_pthread_ok=no

fi


  CC="$PTHREAD_CC"
  CFLAGS="$CFLAGS $PTHREAD_CFLAGS -D_REENTRANT"
  LIBS="$PTHREAD_LIBS $LIBS"
fi
 if test $use_pthreads = "yes"; then
  USE_THREADS_TRUE=
  USE_THREADS_FALSE='#'
else
  USE_THREADS_TRUE='#'
  USE_THREADS_FALSE=
fi


################ handle the FFTW library (Fourier transforms) ################




acx_fftw_ok=no
if test x$fftw_incdir = x; then
  if test x$fftw_libdir = x; then
    if test "${ac_cv_header_fftw3_h+set}" = set; then
23592
23593
  { $as_echo "$as_me:$LINENO: checking for fftw3.h" >&5
$as_echo_n "checking for fftw3.h... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23594
if test "${ac_cv_header_fftw3_h+set}" = set; then
23595
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23596
fi
23597
23598
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fftw3_h" >&5
$as_echo "$ac_cv_header_fftw3_h" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23599
23600
else
  # Is the header compilable?
23601
23602
{ $as_echo "$as_me:$LINENO: checking fftw3.h usability" >&5
$as_echo_n "checking fftw3.h usability... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23603
23604
23605
23606
23607
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <fftw3.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
23618
23619
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23620
23621
23622
23623
23624
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
23625
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23626
23627
23628
23629
23630
23631
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
23632
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23633
23634
23635
23636
23637
23638
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23639
23640
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23641
23642

# Is the header present?
23643
23644
{ $as_echo "$as_me:$LINENO: checking fftw3.h presence" >&5
$as_echo_n "checking fftw3.h presence... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <fftw3.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
23658
23659
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23660
23661
23662
23663
23664
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
23665
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23666
23667
23668
23669
23670
23671
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
23672
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23673
23674
23675
23676
23677
23678
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
23679
23680
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23681
23682
23683
23684

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
23685
23686
23687
23688
    { $as_echo "$as_me:$LINENO: WARNING: fftw3.h: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: fftw3.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: fftw3.h: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: fftw3.h: proceeding with the compiler's result" >&2;}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23689
23690
23691
    ac_header_preproc=yes
    ;;
  no:yes:* )
23692
23693
23694
23695
23696
23697
23698
23699
23700
23701
23702
23703
    { $as_echo "$as_me:$LINENO: WARNING: fftw3.h: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: fftw3.h: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: fftw3.h:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: fftw3.h:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: fftw3.h: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: fftw3.h: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: fftw3.h:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: fftw3.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: fftw3.h: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: fftw3.h: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: fftw3.h: in the future, the compiler will take precedence" >&5
$as_echo "$as_me: WARNING: fftw3.h: in the future, the compiler will take precedence" >&2;}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23704
23705
23706
23707
23708
23709
23710
23711
    ( cat <<\_ASBOX
## ---------------------------- ##
## Report this to bertin@iap.fr ##
## ---------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
23712
23713
{ $as_echo "$as_me:$LINENO: checking for fftw3.h" >&5
$as_echo_n "checking for fftw3.h... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23714
if test "${ac_cv_header_fftw3_h+set}" = set; then
23715
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23716
23717
23718
else
  ac_cv_header_fftw3_h=$ac_header_preproc
fi
23719
23720
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fftw3_h" >&5
$as_echo "$ac_cv_header_fftw3_h" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23721
23722

fi
23723
if test "x$ac_cv_header_fftw3_h" = x""yes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
  acx_fftw_ok=yes
fi


    if test x$acx_fftw_ok = xyes; then

cat >>confdefs.h <<\_ACEOF
#define FFTW_H "fftw.h"
_ACEOF

    else
      if test "${ac_cv_header_fftw_fftw3_h+set}" = set; then
23736
23737
  { $as_echo "$as_me:$LINENO: checking for fftw/fftw3.h" >&5
$as_echo_n "checking for fftw/fftw3.h... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23738
if test "${ac_cv_header_fftw_fftw3_h+set}" = set; then
23739
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23740
fi
23741
23742
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fftw_fftw3_h" >&5
$as_echo "$ac_cv_header_fftw_fftw3_h" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23743
23744
else
  # Is the header compilable?
23745
23746
{ $as_echo "$as_me:$LINENO: checking fftw/fftw3.h usability" >&5
$as_echo_n "checking fftw/fftw3.h usability... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <fftw/fftw3.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
23762
23763
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23764
23765
23766
23767
23768
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
23769
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23770
23771
23772
23773
23774
23775
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
23776
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23777
23778
23779
23780
23781
23782
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23783
23784
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23785
23786

# Is the header present?
23787
23788
{ $as_echo "$as_me:$LINENO: checking fftw/fftw3.h presence" >&5
$as_echo_n "checking fftw/fftw3.h presence... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23789
23790
23791
23792
23793
23794
23795
23796
23797
23798
23799
23800
23801
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <fftw/fftw3.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
23802
23803
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23804
23805
23806
23807
23808
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
23809
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23810
23811
23812
23813
23814
23815
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
23816
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23817
23818
23819
23820
23821
23822
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
23823
23824
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23825
23826
23827
23828

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
23829
23830
23831
23832
    { $as_echo "$as_me:$LINENO: WARNING: fftw/fftw3.h: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: fftw/fftw3.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: fftw/fftw3.h: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: fftw/fftw3.h: proceeding with the compiler's result" >&2;}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23833
23834
23835
    ac_header_preproc=yes
    ;;
  no:yes:* )
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
23847
    { $as_echo "$as_me:$LINENO: WARNING: fftw/fftw3.h: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: fftw/fftw3.h: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: fftw/fftw3.h:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: fftw/fftw3.h:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: fftw/fftw3.h: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: fftw/fftw3.h: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: fftw/fftw3.h:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: fftw/fftw3.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: fftw/fftw3.h: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: fftw/fftw3.h: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: fftw/fftw3.h: in the future, the compiler will take precedence" >&5
$as_echo "$as_me: WARNING: fftw/fftw3.h: in the future, the compiler will take precedence" >&2;}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23848
23849
23850
23851
23852
23853
23854
23855
    ( cat <<\_ASBOX
## ---------------------------- ##
## Report this to bertin@iap.fr ##
## ---------------------------- ##
_ASBOX
     ) | sed "s/^/$as_me: WARNING:     /" >&2
    ;;
esac
23856
23857
{ $as_echo "$as_me:$LINENO: checking for fftw/fftw3.h" >&5
$as_echo_n "checking for fftw/fftw3.h... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23858
if test "${ac_cv_header_fftw_fftw3_h+set}" = set; then
23859
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23860
23861
23862
else
  ac_cv_header_fftw_fftw3_h=$ac_header_preproc
fi
23863
23864
{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fftw_fftw3_h" >&5
$as_echo "$ac_cv_header_fftw_fftw3_h" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23865
23866

fi
23867
if test "x$ac_cv_header_fftw_fftw3_h" = x""yes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23868
23869
23870
23871
23872
23873
23874
23875
23876
23877
23878
23879
23880
23881
23882
  acx_fftw_ok=yes
fi


      if test x$acx_fftw_ok = xyes; then

cat >>confdefs.h <<\_ACEOF
#define FFTW_H "fftw/fftw3.h"
_ACEOF

      else
        FFTW_ERROR="FFTW include files not found in default location!"
      fi
    fi
  else
23883
    as_ac_Header=`$as_echo "ac_cv_header_$fftw_libdir/include/fftw3.h" | $as_tr_sh`
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23884
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23885
23886
  { $as_echo "$as_me:$LINENO: checking for $fftw_libdir/include/fftw3.h" >&5
$as_echo_n "checking for $fftw_libdir/include/fftw3.h... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23887
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
23888
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23889
fi
23890
23891
23892
23893
ac_res=`eval 'as_val=${'$as_ac_Header'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23894
23895
else
  # Is the header compilable?
23896
23897
{ $as_echo "$as_me:$LINENO: checking $fftw_libdir/include/fftw3.h usability" >&5
$as_echo_n "checking $fftw_libdir/include/fftw3.h usability... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
#include <$fftw_libdir/include/fftw3.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
23913
23914
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23915
23916
23917
23918
23919
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
23920
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23921
23922
23923
23924
23925
23926
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_header_compiler=yes
else
23927
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23928
23929
23930
23931
23932
23933
sed 's/^/| /' conftest.$ac_ext >&5

	ac_header_compiler=no
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23934
23935
{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
$as_echo "$ac_header_compiler" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23936
23937

# Is the header present?
23938
23939
{ $as_echo "$as_me:$LINENO: checking $fftw_libdir/include/fftw3.h presence" >&5
$as_echo_n "checking $fftw_libdir/include/fftw3.h presence... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <$fftw_libdir/include/fftw3.h>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
23953
23954
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23955
23956
23957
23958
23959
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
23960
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23961
23962
23963
23964
23965
23966
  (exit $ac_status); } >/dev/null && {
	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
	 test ! -s conftest.err
       }; then
  ac_header_preproc=yes
else
23967
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23968
23969
23970
23971
23972
23973
sed 's/^/| /' conftest.$ac_ext >&5

  ac_header_preproc=no
fi

rm -f conftest.err conftest.$ac_ext
23974
23975
{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23976
23977
23978
23979

# So?  What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
  yes:no: )
23980
23981
23982
23983
    { $as_echo "$as_me:$LINENO: WARNING: $fftw_libdir/include/fftw3.h: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $fftw_libdir/include/fftw3.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $fftw_libdir/include/fftw3.h: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $fftw_libdir/include/fftw3.h: proceeding with the compiler's result" >&2;}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23984
23985
23986
    ac_header_preproc=yes
    ;;
  no:yes:* )
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996
23997
23998
    { $as_echo "$as_me:$LINENO: WARNING: $fftw_libdir/include/fftw3.h: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $fftw_libdir/include/fftw3.h: present but cannot be compiled" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $fftw_libdir/include/fftw3.h:     check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $fftw_libdir/include/fftw3.h:     check for missing prerequisite headers?" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $fftw_libdir/include/fftw3.h: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $fftw_libdir/include/fftw3.h: see the Autoconf documentation" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $fftw_libdir/include/fftw3.h:     section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $fftw_libdir/include/fftw3.h:     section \"Present But Cannot Be Compiled\"" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $fftw_libdir/include/fftw3.h: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $fftw_libdir/include/fftw3.h: proceeding with the preprocessor's result" >&2;}
    { $as_echo "$as_me:$LINENO: WARNING: $fftw_libdir/include/fftw3.h: in the future, the compiler will take precedence" >&5
$as_echo "$as_me: WARNING: $fftw_libdir/include/fftw3.h: in the future, the compiler will take precedence" >&2;}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23999
24000
    ( cat <<\_ASBOX
## ---------------------------- ##
For faster browsing, not all history is shown. View entire blame