configure 503 KB
Newer Older
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
                   if (LLONG_MAX / 2 < m)
                     break;
                 }
               return 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_type_long_long_int=yes
else
  ac_cv_type_long_long_int=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12016
12017
12018
fi

else
12019
  ac_cv_type_long_long_int=no
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12020
fi
12021
12022
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12023
fi
12024
12025
12026
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
$as_echo "$ac_cv_type_long_long_int" >&6; }
  if test $ac_cv_type_long_long_int = yes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12027

12028
$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12029
12030
12031
12032

  fi


12033
12034
12035
12036
12037
12038
12039
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
$as_echo_n "checking for unsigned long long int... " >&6; }
if ${ac_cv_type_unsigned_long_long_int+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12040

12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
  /* For now, do not test the preprocessor; as of 2007 there are too many
         implementations with broken preprocessors.  Perhaps this can
         be revisited in 2012.  In the meantime, code should not expect
         #if to work with literals wider than 32 bits.  */
      /* Test literals.  */
      long long int ll = 9223372036854775807ll;
      long long int nll = -9223372036854775807LL;
      unsigned long long int ull = 18446744073709551615ULL;
      /* Test constant expressions.   */
      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
                     ? 1 : -1)];
      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
                     ? 1 : -1)];
      int i = 63;
int
main ()
{
/* Test availability of runtime routines for shift and division.  */
      long long int llmax = 9223372036854775807ll;
      unsigned long long int ullmax = 18446744073709551615ull;
      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
              | (llmax / ll) | (llmax % ll)
              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
              | (ullmax / ull) | (ullmax % ull));
  ;
  return 0;
}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12068

12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_type_unsigned_long_long_int=yes
else
  ac_cv_type_unsigned_long_long_int=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
  if test $ac_cv_type_unsigned_long_long_int = yes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12081

12082
$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12083

12084
  fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12085

12086
12087
12088
12089
12090
12091
12092
12093
12094
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
if ${ac_cv_struct_tm+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <time.h>
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12095

12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
int
main ()
{
struct tm tm;
				     int *p = &tm.tm_sec;
				     return !p;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_struct_tm=time.h
else
  ac_cv_struct_tm=sys/time.h
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
$as_echo "$ac_cv_struct_tm" >&6; }
if test $ac_cv_struct_tm = sys/time.h; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12116

12117
$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12118

12119
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12120

12121
12122
12123
12124
12125
12126
12127
12128
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
if ${ac_cv_type_uid_t+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12129

12130
12131
12132
12133
12134
12135
12136
12137
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  $EGREP "uid_t" >/dev/null 2>&1; then :
  ac_cv_type_uid_t=yes
else
  ac_cv_type_uid_t=no
fi
rm -f conftest*
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12138

12139
12140
12141
12142
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
$as_echo "$ac_cv_type_uid_t" >&6; }
if test $ac_cv_type_uid_t = no; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12143

12144
$as_echo "#define uid_t int" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12145
12146


12147
$as_echo "#define gid_t int" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12148

12149
fi
12150
12151


12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
# Checks for library functions.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
$as_echo_n "checking for error_at_line... " >&6; }
if ${ac_cv_lib_error_at_line+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <error.h>
int
main ()
{
error_at_line (0, 0, "", 0, "an error occurred");
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_error_at_line=yes
else
  ac_cv_lib_error_at_line=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
$as_echo "$ac_cv_lib_error_at_line" >&6; }
if test $ac_cv_lib_error_at_line = no; then
  case " $LIBOBJS " in
  *" error.$ac_objext "* ) ;;
  *) LIBOBJS="$LIBOBJS error.$ac_objext"
 ;;
esac
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12185

12186
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12187
12188
12189
12190




12191
12192
12193
12194
12195
12196
12197
12198
12199
  for ac_header in $ac_header_list
do :
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12200

12201
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12202

12203
done
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12204
12205
12206
12207
12208
12209
12210
12211








12212
12213
12214
12215
12216
12217
12218
for ac_func in getpagesize
do :
  ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
if test "x$ac_cv_func_getpagesize" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_GETPAGESIZE 1
_ACEOF
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12219

12220
12221
fi
done
12222

12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
$as_echo_n "checking for working mmap... " >&6; }
if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  ac_cv_func_mmap_fixed_mapped=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
/* malloc might have been renamed as rpl_malloc. */
#undef malloc
12236

12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
/* Thanks to Mike Haertel and Jim Avera for this test.
   Here is a matrix of mmap possibilities:
	mmap private not fixed
	mmap private fixed at somewhere currently unmapped
	mmap private fixed at somewhere already mapped
	mmap shared not fixed
	mmap shared fixed at somewhere currently unmapped
	mmap shared fixed at somewhere already mapped
   For private mappings, we should verify that changes cannot be read()
   back from the file, nor mmap's back from the file at a different
   address.  (There have been systems where private was not correctly
   implemented like the infamous i386 svr4.0, and systems where the
   VM page cache was not coherent with the file system buffer cache
   like early versions of FreeBSD and possibly contemporary NetBSD.)
   For shared mappings, we should conversely verify that changes get
   propagated back to all the places they're supposed to be.
12253

12254
12255
12256
12257
   Grep wants private fixed already mapped.
   The main things grep needs to know about mmap are:
   * does it exist and is it safe to write into the mmap'd area
   * how to use it (BSD variants)  */
12258

12259
12260
#include <fcntl.h>
#include <sys/mman.h>
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12261

12262
12263
12264
#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
char *malloc ();
#endif
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12265

12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
/* This mess was copied from the GNU getpagesize.h.  */
#ifndef HAVE_GETPAGESIZE
# ifdef _SC_PAGESIZE
#  define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
#  ifdef HAVE_SYS_PARAM_H
#   include <sys/param.h>
#   ifdef EXEC_PAGESIZE
#    define getpagesize() EXEC_PAGESIZE
#   else /* no EXEC_PAGESIZE */
#    ifdef NBPG
#     define getpagesize() NBPG * CLSIZE
#     ifndef CLSIZE
#      define CLSIZE 1
#     endif /* no CLSIZE */
#    else /* no NBPG */
#     ifdef NBPC
#      define getpagesize() NBPC
#     else /* no NBPC */
#      ifdef PAGESIZE
#       define getpagesize() PAGESIZE
#      endif /* PAGESIZE */
#     endif /* no NBPC */
#    endif /* no NBPG */
#   endif /* no EXEC_PAGESIZE */
#  else /* no HAVE_SYS_PARAM_H */
#   define getpagesize() 8192	/* punt totally */
#  endif /* no HAVE_SYS_PARAM_H */
# endif /* no _SC_PAGESIZE */
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12295

12296
#endif /* no HAVE_GETPAGESIZE */
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12297

12298
12299
12300
12301
12302
12303
12304
int
main ()
{
  char *data, *data2, *data3;
  const char *cdata2;
  int i, pagesize;
  int fd, fd2;
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12305

12306
  pagesize = getpagesize ();
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12307

12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
  /* First, make a file with some known garbage in it. */
  data = (char *) malloc (pagesize);
  if (!data)
    return 1;
  for (i = 0; i < pagesize; ++i)
    *(data + i) = rand ();
  umask (0);
  fd = creat ("conftest.mmap", 0600);
  if (fd < 0)
    return 2;
  if (write (fd, data, pagesize) != pagesize)
    return 3;
  close (fd);
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12321

12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
  /* Next, check that the tail of a page is zero-filled.  File must have
     non-zero length, otherwise we risk SIGBUS for entire page.  */
  fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
  if (fd2 < 0)
    return 4;
  cdata2 = "";
  if (write (fd2, cdata2, 1) != 1)
    return 5;
  data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
  if (data2 == MAP_FAILED)
    return 6;
  for (i = 0; i < pagesize; ++i)
    if (*(data2 + i))
      return 7;
  close (fd2);
  if (munmap (data2, pagesize))
    return 8;
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12339

12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
  /* Next, try to mmap the file at a fixed address which already has
     something else allocated at it.  If we can, also make sure that
     we see the same garbage.  */
  fd = open ("conftest.mmap", O_RDWR);
  if (fd < 0)
    return 9;
  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
		     MAP_PRIVATE | MAP_FIXED, fd, 0L))
    return 10;
  for (i = 0; i < pagesize; ++i)
    if (*(data + i) != *(data2 + i))
      return 11;
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12352

12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
  /* Finally, make sure that changes to the mapped area do not
     percolate back to the file as seen by read().  (This is a bug on
     some variants of i386 svr4.0.)  */
  for (i = 0; i < pagesize; ++i)
    *(data2 + i) = *(data2 + i) + 1;
  data3 = (char *) malloc (pagesize);
  if (!data3)
    return 12;
  if (read (fd, data3, pagesize) != pagesize)
    return 13;
  for (i = 0; i < pagesize; ++i)
    if (*(data + i) != *(data3 + i))
      return 14;
  close (fd);
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_func_mmap_fixed_mapped=yes
else
  ac_cv_func_mmap_fixed_mapped=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12378

12379
12380
12381
12382
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
if test $ac_cv_func_mmap_fixed_mapped = yes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12383

12384
$as_echo "#define HAVE_MMAP 1" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12385

12386
12387
fi
rm -f conftest.mmap conftest.txt
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12388

12389
12390
12391
12392
12393
12394
12395
12396
12397
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
$as_echo_n "checking return type of signal handlers... " >&6; }
if ${ac_cv_type_signal+:} false; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
#include <signal.h>
12398

12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
int
main ()
{
return *(signal (0, 0)) (0) == 1;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_type_signal=int
else
  ac_cv_type_signal=void
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
$as_echo "$ac_cv_type_signal" >&6; }
12416

12417
12418
12419
cat >>confdefs.h <<_ACEOF
#define RETSIGTYPE $ac_cv_type_signal
_ACEOF
12420
12421


12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
  $as_echo_n "(cached) " >&6
else
  rm -f conftest.sym conftest.file
echo >conftest.file
if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
  if test "$cross_compiling" = yes; then :
  ac_cv_func_lstat_dereferences_slashed_symlink=no
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
struct stat sbuf;
     /* Linux will dereference the symlink and fail, as required by POSIX.
	That is better in the sense that it means we will not
	have to compile and use the lstat wrapper.  */
     return lstat ("conftest.sym/", &sbuf) == 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_func_lstat_dereferences_slashed_symlink=yes
else
  ac_cv_func_lstat_dereferences_slashed_symlink=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
12456

12457
12458
12459
12460
12461
12462
else
  # If the `ln -s' command failed, then we probably don't even
  # have an lstat function.
  ac_cv_func_lstat_dereferences_slashed_symlink=no
fi
rm -f conftest.sym conftest.file
12463

12464
12465
12466
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
12467

12468
test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
12469

12470
12471
12472
cat >>confdefs.h <<_ACEOF
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
_ACEOF
12473
12474


12475
12476
12477
12478
12479
12480
if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
  case " $LIBOBJS " in
  *" lstat.$ac_objext "* ) ;;
  *) LIBOBJS="$LIBOBJS lstat.$ac_objext"
 ;;
esac
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12481

12482
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12483

12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5
$as_echo_n "checking whether stat accepts an empty string... " >&6; }
if ${ac_cv_func_stat_empty_string_bug+:} false; then :
  $as_echo_n "(cached) " >&6
else
  if test "$cross_compiling" = yes; then :
  ac_cv_func_stat_empty_string_bug=yes
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
struct stat sbuf;
  return stat ("", &sbuf) == 0;
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
  ac_cv_func_stat_empty_string_bug=no
else
  ac_cv_func_stat_empty_string_bug=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
  conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12512

12513
12514
12515
12516
12517
12518
12519
12520
12521
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5
$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; }
if test $ac_cv_func_stat_empty_string_bug = yes; then
  case " $LIBOBJS " in
  *" stat.$ac_objext "* ) ;;
  *) LIBOBJS="$LIBOBJS stat.$ac_objext"
 ;;
esac
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12522
12523


12524
12525
12526
cat >>confdefs.h <<_ACEOF
#define HAVE_STAT_EMPTY_STRING_BUG 1
_ACEOF
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12527

12528
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12529

12530
12531
12532
12533
12534
12535
12536
for ac_func in strftime
do :
  ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
if test "x$ac_cv_func_strftime" = xyes; then :
  cat >>confdefs.h <<_ACEOF
#define HAVE_STRFTIME 1
_ACEOF
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12537

12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
else
  # strftime is in -lintl on SCO UNIX.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
$as_echo_n "checking for strftime in -lintl... " >&6; }
if ${ac_cv_lib_intl_strftime+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl  $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12549

12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
/* 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 strftime ();
int
main ()
{
return strftime ();
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_lib_intl_strftime=yes
12567
else
12568
12569
12570
12571
12572
  ac_cv_lib_intl_strftime=no
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12573
fi
12574
12575
12576
12577
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
$as_echo "$ac_cv_lib_intl_strftime" >&6; }
if test "x$ac_cv_lib_intl_strftime" = xyes; then :
  $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12578

12579
12580
LIBS="-lintl $LIBS"
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12581

12582
12583
fi
done
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12584

12585
12586
12587
12588
12589
12590
12591
12592
12593
for ac_func in atexit logf getenv gettimeofday memcpy memmove memset mkdir \
		munmap posix_memalign setlinebuf sincosf strstr sysconf
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
  cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12594

12595
12596
fi
done
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12597

12598
12599
ac_fn_c_check_func "$LINENO" "isnan" "ac_cv_func_isnan"
if test "x$ac_cv_func_isnan" = xyes; then :
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12600

12601
12602
12603
cat >>confdefs.h <<_ACEOF
#define HAVE_ISNAN2 1
_ACEOF
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12604

12605
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12606
12607


12608
12609
12610
12611
12612
# Check support for large files
# Check whether --enable-largefile was given.
if test "${enable_largefile+set}" = set; then :
  enableval=$enable_largefile;
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12613

12614
if test "$enable_largefile" != no; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12615

12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
if ${ac_cv_sys_largefile_CC+:} false; then :
  $as_echo_n "(cached) " >&6
else
  ac_cv_sys_largefile_CC=no
     if test "$GCC" != yes; then
       ac_save_CC=$CC
       while :; do
	 # IRIX 6.2 and later do not support large files by default,
	 # so use the C compiler's -n32 option if that helps.
	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
		       && LARGE_OFF_T % 2147483647 == 1)
		      ? 1 : -1];
int
main ()
{
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12641

12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
  ;
  return 0;
}
_ACEOF
	 if ac_fn_c_try_compile "$LINENO"; then :
  break
fi
rm -f core conftest.err conftest.$ac_objext
	 CC="$CC -n32"
	 if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_sys_largefile_CC=' -n32'; break
fi
rm -f core conftest.err conftest.$ac_objext
	 break
       done
       CC=$ac_save_CC
       rm -f conftest.$ac_ext
    fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
$as_echo "$ac_cv_sys_largefile_CC" >&6; }
  if test "$ac_cv_sys_largefile_CC" != no; then
    CC=$CC$ac_cv_sys_largefile_CC
  fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12666

12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
if ${ac_cv_sys_file_offset_bits+:} false; then :
  $as_echo_n "(cached) " >&6
else
  while :; do
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
		       && LARGE_OFF_T % 2147483647 == 1)
		      ? 1 : -1];
int
main ()
{
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12687

12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_sys_file_offset_bits=no; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
		       && LARGE_OFF_T % 2147483647 == 1)
		      ? 1 : -1];
int
main ()
{
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12711

12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_sys_file_offset_bits=64; break
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  ac_cv_sys_file_offset_bits=unknown
  break
12722
done
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
case $ac_cv_sys_file_offset_bits in #(
  no | unknown) ;;
  *)
cat >>confdefs.h <<_ACEOF
#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
_ACEOF
;;
esac
rm -rf conftest*
  if test $ac_cv_sys_file_offset_bits = unknown; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
if ${ac_cv_sys_large_files+:} false; then :
12739
12740
  $as_echo_n "(cached) " >&6
else
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
  while :; do
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
		       && LARGE_OFF_T % 2147483647 == 1)
		      ? 1 : -1];
int
main ()
{
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12756

12757
12758
12759
12760
12761
12762
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_sys_large_files=no; break
12763
fi
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#define _LARGE_FILES 1
#include <sys/types.h>
 /* Check that off_t can represent 2**63 - 1 correctly.
    We can't simply define LARGE_OFF_T to be 9223372036854775807,
    since some C++ compilers masquerading as C compilers
    incorrectly reject 9223372036854775807.  */
#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
		       && LARGE_OFF_T % 2147483647 == 1)
		      ? 1 : -1];
int
main ()
{
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12780

12781
12782
12783
12784
12785
12786
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  ac_cv_sys_large_files=1; break
12787
fi
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  ac_cv_sys_large_files=unknown
  break
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
$as_echo "$ac_cv_sys_large_files" >&6; }
case $ac_cv_sys_large_files in #(
  no | unknown) ;;
  *)
cat >>confdefs.h <<_ACEOF
#define _LARGE_FILES $ac_cv_sys_large_files
_ACEOF
;;
esac
rm -rf conftest*
  fi
12805
12806


12807
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12808

12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
if ${ac_cv_sys_largefile_source+:} false; then :
  $as_echo_n "(cached) " >&6
else
  while :; do
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#include <sys/types.h> /* for off_t */
     #include <stdio.h>
int
main ()
{
int (*fp) (FILE *, off_t, int) = fseeko;
     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_sys_largefile_source=no; break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
#define _LARGEFILE_SOURCE 1
#include <sys/types.h> /* for off_t */
     #include <stdio.h>
int
main ()
{
int (*fp) (FILE *, off_t, int) = fseeko;
     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
  ac_cv_sys_largefile_source=1; break
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
  ac_cv_sys_largefile_source=unknown
  break
done
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
$as_echo "$ac_cv_sys_largefile_source" >&6; }
case $ac_cv_sys_largefile_source in #(
  no | unknown) ;;
  *)
cat >>confdefs.h <<_ACEOF
#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
_ACEOF
;;
esac
rm -rf conftest*
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12867

12868
12869
12870
12871
# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
# in glibc 2.1.3, but that breaks too many other things.
# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
if test $ac_cv_sys_largefile_source != unknown; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12872

12873
$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12874

12875
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12876
12877


12878
# Provide special options for ATLAS
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12879

12880
12881
12882
# Check whether --with-atlas-libdir was given.
if test "${with_atlas_libdir+set}" = set; then :
  withval=$with_atlas_libdir;
12883
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12884
12885


12886
12887
12888
12889
# Check whether --with-atlas-incdir was given.
if test "${with_atlas_incdir+set}" = set; then :
  withval=$with_atlas_incdir;
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12890
12891


12892
# Provide special options for FFTW
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12893

12894
12895
12896
# Check whether --with-fftw-libdir was given.
if test "${with_fftw_libdir+set}" = set; then :
  withval=$with_fftw_libdir;
12897
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12898
12899


12900
12901
12902
12903
# Check whether --with-fftw-incdir was given.
if test "${with_fftw_incdir+set}" = set; then :
  withval=$with_fftw_incdir;
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12904
12905


12906
12907
12908
12909
12910
12911
12912
12913
# Provide special options for the MKL library

# Check whether --with-mkl-dir was given.
if test "${with_mkl_dir+set}" = set; then :
  withval=$with_mkl_dir;
fi


12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
# Provide a special option for the default XSLT URL
with_xsl_url="file://"$(# PATH urbi_resolve_dir(DIR)
# --------------------------
#
urbi_resolve_dir ()
{
  ac_URBI_RESOLVE_DIR_PREPARE_dir=$1
  ac_URBI_RESOLVE_DIR_PREPARE_res=
  ac_URBI_RESOLVE_DIR_PREPARE_prefix_NONE=
  ac_URBI_RESOLVE_DIR_PREPARE_exec_prefix_NONE=
  test "x$prefix" = xNONE &&
     ac_URBI_RESOLVE_DIR_PREPARE_exec_prefix_NONE=yes &&
     prefix=$ac_default_prefix
  test "x$exec_prefix" = xNONE &&
     ac_URBI_RESOLVE_DIR_PREPARE_exec_prefix_NONE=yes &&
     exec_prefix=$prefix
  while true
  do
    eval ac_URBI_RESOLVE_DIR_PREPARE_res="$ac_URBI_RESOLVE_DIR_PREPARE_dir"
    if test x"$ac_URBI_RESOLVE_DIR_PREPARE_dir" = x"$ac_URBI_RESOLVE_DIR_PREPARE_res"; then
      break
    fi
    ac_URBI_RESOLVE_DIR_PREPARE_dir=$ac_URBI_RESOLVE_DIR_PREPARE_res
  done
  test "$ac_URBI_RESOLVE_DIR_PREPARE_prefix_NONE" && prefix=NONE
  test "$ac_URBI_RESOLVE_DIR_PREPARE_exec_prefix_NONE" && exec_prefix=NONE
  echo "$ac_URBI_RESOLVE_DIR_PREPARE_res"
}
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12942

12943
urbi_resolve_dir '$datadir')"/$PACKAGE_NAME/$PACKAGE_NAME.xsl"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12944

12945
12946
12947
12948
# Check whether --with-xsl_url was given.
if test "${with_xsl_url+set}" = set; then :
  withval=$with_xsl_url;
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12949
12950
12951



12952
12953
12954
cat >>confdefs.h <<_ACEOF
#define XSL_URL "$with_xsl_url"
_ACEOF
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12955
12956


12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
# Provide special option to disable model-fitting (enabled by default)
enable_model_fitting="yes"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if model-fitting should be disabled" >&5
$as_echo_n "checking if model-fitting should be disabled... " >&6; }
# Check whether --enable-model-fitting was given.
if test "${enable_model_fitting+set}" = set; then :
  enableval=$enable_model_fitting; if test "$enable_model_fitting" = "no"; then
	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
	else
	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
	fi
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12971
12972


12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
# Set flags for multithreading
n_pthreads=16
# Check whether --enable-threads was given.
if test "${enable_threads+set}" = set; then :
  enableval=$enable_threads; if test "$enableval" = "no"; then
      use_pthreads="no"
    else
      use_pthreads="yes"
      if test "$enableval" != "yes"; then
        n_pthreads=$enableval
      fi
    fi
else
  use_pthreads=yes
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12987

12988
fi
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12989

12990
12991
# Deactivate multithreading for now
use_pthreads="no"
Emmanuel Bertin's avatar
Emmanuel Bertin committed
12992

12993
12994
12995
12996
12997
12998
# Provide special option for profiling
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for profiler mode" >&5
$as_echo_n "checking for profiler mode... " >&6; }
# Check whether --enable-profiling was given.
if test "${enable_profiling+set}" = set; then :
  enableval=$enable_profiling; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12999
$as_echo "yes" >&6; }
13000
else
For faster browsing, not all history is shown. View entire blame