configure 911 KB
Newer Older
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029

/* 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 $ac_func ();
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
#endif

int
main ()
{
return $ac_func ();
  ;
  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
22030
22031
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22032
22033
22034
22035
22036
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
22037
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22038
22039
22040
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
22041
22042
22043
22044
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22045
22046
  eval "$as_ac_var=yes"
else
22047
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22048
22049
22050
22051
22052
sed 's/^/| /' conftest.$ac_ext >&5

	eval "$as_ac_var=no"
fi

22053
rm -rf conftest.dSYM
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22054
22055
22056
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
22057
22058
22059
22060
22061
22062
22063
ac_res=`eval 'as_val=${'$as_ac_var'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
as_val=`eval 'as_val=${'$as_ac_var'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22064
  cat >>confdefs.h <<_ACEOF
22065
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22066
22067
22068
22069
22070
_ACEOF

fi
done

22071
22072
{ $as_echo "$as_me:$LINENO: checking for working mmap" >&5
$as_echo_n "checking for working mmap... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22073
if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
22074
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_mmap_fixed_mapped=no
else
  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
/* malloc might have been renamed as rpl_malloc. */
#undef malloc

/* 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.

   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)  */

#include <fcntl.h>
#include <sys/mman.h>

#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
char *malloc ();
#endif

/* This mess was copied from the GNU getpagesize.h.  */
#ifndef HAVE_GETPAGESIZE
/* Assume that all systems that can run configure have sys/param.h.  */
# ifndef HAVE_SYS_PARAM_H
#  define HAVE_SYS_PARAM_H 1
# endif

# 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 */

#endif /* no HAVE_GETPAGESIZE */

int
main ()
{
  char *data, *data2, *data3;
  int i, pagesize;
  int fd;

  pagesize = getpagesize ();

  /* 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 1;
  if (write (fd, data, pagesize) != pagesize)
    return 1;
  close (fd);

  /* 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 1;
  data2 = (char *) malloc (2 * pagesize);
  if (!data2)
    return 1;
  data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
		     MAP_PRIVATE | MAP_FIXED, fd, 0L))
    return 1;
  for (i = 0; i < pagesize; ++i)
    if (*(data + i) != *(data2 + i))
      return 1;

  /* 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 1;
  if (read (fd, data3, pagesize) != pagesize)
    return 1;
  for (i = 0; i < pagesize; ++i)
    if (*(data + i) != *(data3 + i))
      return 1;
  close (fd);
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
22218
22219
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22220
22221
  (eval "$ac_link") 2>&5
  ac_status=$?
22222
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22223
22224
22225
22226
22227
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
22228
22229
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22230
22231
  (eval "$ac_try") 2>&5
  ac_status=$?
22232
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22233
22234
22235
  (exit $ac_status); }; }; then
  ac_cv_func_mmap_fixed_mapped=yes
else
22236
22237
  $as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22238
22239
22240
22241
22242
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ac_cv_func_mmap_fixed_mapped=no
fi
22243
rm -rf conftest.dSYM
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22244
22245
22246
22247
22248
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi


fi
22249
22250
{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22251
22252
22253
22254
22255
22256
22257
22258
22259
if test $ac_cv_func_mmap_fixed_mapped = yes; then

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

fi
rm -f conftest.mmap

22260
22261
{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
$as_echo_n "checking return type of signal handlers... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22262
if test "${ac_cv_type_signal+set}" = set; then
22263
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
#include <sys/types.h>
#include <signal.h>

int
main ()
{
return *(signal (0, 0)) (0) == 1;
  ;
  return 0;
}
_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
22288
22289
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22290
22291
22292
22293
22294
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
22295
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22296
22297
22298
22299
22300
22301
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_type_signal=int
else
22302
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22303
22304
22305
22306
22307
22308
22309
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_type_signal=void
fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
22310
22311
{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
$as_echo "$ac_cv_type_signal" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22312
22313
22314
22315
22316
22317

cat >>confdefs.h <<_ACEOF
#define RETSIGTYPE $ac_cv_type_signal
_ACEOF


22318
22319
{ $as_echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5
$as_echo_n "checking whether lstat dereferences a symlink specified with a trailing slash... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22320
if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then
22321
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
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 >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
$ac_includes_default
int
main ()
{
struct stat sbuf;
     /* Linux will dereference the symlink and fail.
	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
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
22354
22355
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22356
22357
  (eval "$ac_link") 2>&5
  ac_status=$?
22358
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22359
22360
22361
22362
22363
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
22364
22365
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22366
22367
  (eval "$ac_try") 2>&5
  ac_status=$?
22368
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22369
22370
22371
  (exit $ac_status); }; }; then
  ac_cv_func_lstat_dereferences_slashed_symlink=yes
else
22372
22373
  $as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22374
22375
22376
22377
22378
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ac_cv_func_lstat_dereferences_slashed_symlink=no
fi
22379
rm -rf conftest.dSYM
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi


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

fi
22392
22393
{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410

test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&

cat >>confdefs.h <<_ACEOF
#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
_ACEOF


if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
  case " $LIBOBJS " in
  *" lstat.$ac_objext "* ) ;;
  *) LIBOBJS="$LIBOBJS lstat.$ac_objext"
 ;;
esac

fi

22411
22412
{ $as_echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5
$as_echo_n "checking whether stat accepts an empty string... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22413
if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then
22414
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
else
  if test "$cross_compiling" = yes; then
  ac_cv_func_stat_empty_string_bug=yes
else
  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
int
main ()
{
struct stat sbuf;
  return stat ("", &sbuf) == 0;
  ;
  return 0;
}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
22441
22442
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22443
22444
  (eval "$ac_link") 2>&5
  ac_status=$?
22445
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22446
22447
22448
22449
22450
  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  { (case "(($ac_try" in
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  *) ac_try_echo=$ac_try;;
esac
22451
22452
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22453
22454
  (eval "$ac_try") 2>&5
  ac_status=$?
22455
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22456
22457
22458
  (exit $ac_status); }; }; then
  ac_cv_func_stat_empty_string_bug=no
else
22459
22460
  $as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22461
22462
22463
22464
22465
sed 's/^/| /' conftest.$ac_ext >&5

( exit $ac_status )
ac_cv_func_stat_empty_string_bug=yes
fi
22466
rm -rf conftest.dSYM
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22467
22468
22469
22470
22471
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi


fi
22472
22473
{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5
$as_echo "$ac_cv_func_stat_empty_string_bug" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
if test $ac_cv_func_stat_empty_string_bug = yes; then
  case " $LIBOBJS " in
  *" stat.$ac_objext "* ) ;;
  *) LIBOBJS="$LIBOBJS stat.$ac_objext"
 ;;
esac


cat >>confdefs.h <<_ACEOF
#define HAVE_STAT_EMPTY_STRING_BUG 1
_ACEOF

fi


for ac_func in strftime
do
22491
22492
22493
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
$as_echo_n "checking for $ac_func... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22494
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22495
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* 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 $ac_func ();
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
#endif

int
main ()
{
return $ac_func ();
  ;
  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
22548
22549
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22550
22551
22552
22553
22554
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
22555
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22556
22557
22558
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
22559
22560
22561
22562
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22563
22564
  eval "$as_ac_var=yes"
else
22565
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22566
22567
22568
22569
22570
sed 's/^/| /' conftest.$ac_ext >&5

	eval "$as_ac_var=no"
fi

22571
rm -rf conftest.dSYM
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22572
22573
22574
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
22575
22576
22577
22578
22579
22580
22581
ac_res=`eval 'as_val=${'$as_ac_var'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
as_val=`eval 'as_val=${'$as_ac_var'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22582
  cat >>confdefs.h <<_ACEOF
22583
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22584
22585
22586
22587
_ACEOF

else
  # strftime is in -lintl on SCO UNIX.
22588
22589
{ $as_echo "$as_me:$LINENO: checking for strftime in -lintl" >&5
$as_echo_n "checking for strftime in -lintl... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22590
if test "${ac_cv_lib_intl_strftime+set}" = set; then
22591
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622
else
  ac_check_lib_save_LIBS=$LIBS
LIBS="-lintl  $LIBS"
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 strftime ();
int
main ()
{
return strftime ();
  ;
  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
22623
22624
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22625
22626
22627
22628
22629
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
22630
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22631
22632
22633
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
22634
22635
22636
22637
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22638
22639
  ac_cv_lib_intl_strftime=yes
else
22640
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22641
22642
22643
22644
22645
sed 's/^/| /' conftest.$ac_ext >&5

	ac_cv_lib_intl_strftime=no
fi

22646
rm -rf conftest.dSYM
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22647
22648
22649
22650
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
22651
22652
22653
{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5
$as_echo "$ac_cv_lib_intl_strftime" >&6; }
if test "x$ac_cv_lib_intl_strftime" = x""yes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
  cat >>confdefs.h <<\_ACEOF
#define HAVE_STRFTIME 1
_ACEOF

LIBS="-lintl $LIBS"
fi

fi
done











22674

22675

Emmanuel Bertin's avatar
Emmanuel Bertin committed
22676
for ac_func in atexit getenv memcpy memmove memset mkdir munmap strstr \
22677
		sincosf logf gettimeofday posix_memalign
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22678
do
22679
22680
22681
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
$as_echo_n "checking for $ac_func... " >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22682
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
22683
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22684
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733
22734
22735
else
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h.  */
/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
#define $ac_func innocuous_$ac_func

/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char $ac_func (); below.
    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
    <limits.h> exists even on freestanding compilers.  */

#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif

#undef $ac_func

/* 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 $ac_func ();
/* The GNU C library defines this for functions which it implements
    to always fail with ENOSYS.  Some functions are actually named
    something starting with __ and the normal name is an alias.  */
#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
#endif

int
main ()
{
return $ac_func ();
  ;
  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
22736
22737
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22738
22739
22740
22741
22742
  (eval "$ac_link") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
22743
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22744
22745
22746
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
22747
22748
22749
22750
       } && test -s conftest$ac_exeext && {
	 test "$cross_compiling" = yes ||
	 $as_test_x conftest$ac_exeext
       }; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22751
22752
  eval "$as_ac_var=yes"
else
22753
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22754
22755
22756
22757
22758
sed 's/^/| /' conftest.$ac_ext >&5

	eval "$as_ac_var=no"
fi

22759
rm -rf conftest.dSYM
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22760
22761
22762
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
      conftest$ac_exeext conftest.$ac_ext
fi
22763
22764
22765
22766
22767
22768
22769
ac_res=`eval 'as_val=${'$as_ac_var'}
		 $as_echo "$as_val"'`
	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
as_val=`eval 'as_val=${'$as_ac_var'}
		 $as_echo "$as_val"'`
   if test "x$as_val" = x""yes; then
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22770
  cat >>confdefs.h <<_ACEOF
22771
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
22782
22783
22784
22785
_ACEOF

fi
done


# Check support for large files
# Check whether --enable-largefile was given.
if test "${enable_largefile+set}" = set; then
  enableval=$enable_largefile;
fi

if test "$enable_largefile" != no; then

22786
22787
  { $as_echo "$as_me:$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; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22788
if test "${ac_cv_sys_largefile_CC+set}" = set; then
22789
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
22824
22825
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 >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* 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 ()
{

  ;
  return 0;
}
_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
22826
22827
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22828
22829
22830
22831
22832
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
22833
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22834
22835
22836
22837
22838
22839
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  break
else
22840
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext
	 CC="$CC -n32"
	 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
22854
22855
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22856
22857
22858
22859
22860
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
22861
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22862
22863
22864
22865
22866
22867
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_sys_largefile_CC=' -n32'; break
else
22868
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext
	 break
       done
       CC=$ac_save_CC
       rm -f conftest.$ac_ext
    fi
fi
22881
22882
{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
$as_echo "$ac_cv_sys_largefile_CC" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22883
22884
22885
22886
  if test "$ac_cv_sys_largefile_CC" != no; then
    CC=$CC$ac_cv_sys_largefile_CC
  fi

22887
22888
  { $as_echo "$as_me:$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; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22889
if test "${ac_cv_sys_file_offset_bits+set}" = set; then
22890
  $as_echo_n "(cached) " >&6
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
else
  while :; do
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* 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 ()
{

  ;
  return 0;
}
_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
22922
22923
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22924
22925
22926
22927
22928
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
22929
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22930
22931
22932
22933
22934
22935
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_sys_file_offset_bits=no; break
else
22936
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h.  */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* 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 ()
{

  ;
  return 0;
}
_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
22973
22974
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22975
22976
22977
22978
22979
  (eval "$ac_compile") 2>conftest.er1
  ac_status=$?
  grep -v '^ *+' conftest.er1 >conftest.err
  rm -f conftest.er1
  cat conftest.err >&5
22980
  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22981
22982
22983
22984
22985
22986
  (exit $ac_status); } && {
	 test -z "$ac_c_werror_flag" ||
	 test ! -s conftest.err
       } && test -s conftest.$ac_objext; then
  ac_cv_sys_file_offset_bits=64; break
else
22987
  $as_echo "$as_me: failed program was:" >&5
Emmanuel Bertin's avatar
Emmanuel Bertin committed
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
sed 's/^/| /' conftest.$ac_ext >&5


fi

rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  ac_cv_sys_file_offset_bits=unknown
  break
done
fi
22998
22999
{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
Emmanuel Bertin's avatar
Emmanuel Bertin committed
23000
case $ac_cv_sys_file_offset_bits in #(
For faster browsing, not all history is shown. View entire blame