Commit 5a02580f 5a02580f427d31397e09d57ed8a08420e0417f32 by Sergey Poznyakoff

Check for large file support and fseeko. Replace

the latter with fseek if it is not available.
(MU_GUILE_SITE_DIR,MU_GUILE_SIEVE_MOD_DIR)
(MU_GUILE_SIEVE_SCRIPTS,MU_GUILE_SIEVE_MOD_DATA): New variables
1 parent 38ae4fcf
...@@ -403,11 +403,15 @@ m4_copy([MU_SAVE_AC_LIBOBJ],[AC_LIBOBJ]) ...@@ -403,11 +403,15 @@ m4_copy([MU_SAVE_AC_LIBOBJ],[AC_LIBOBJ])
403 403
404 libmuaux_GNULIB 404 libmuaux_GNULIB
405 405
406 # Check for large file support
407 AC_SYS_LARGEFILE
408
406 ##### 409 #####
407 # Determine the size of off_t and define an equivalent mu_off_t type. 410 # Determine the size of off_t and define an equivalent mu_off_t type.
408 # We cannot use off_t in the library since its size depends on whether 411 # We cannot use off_t in the library since its size depends on whether
409 # large file support is used or not, which will lead to arbitrary crashes 412 # large file support is used or not, which will lead to arbitrary crashes
410 # if a user application and the library use off_t of different sizes. 413 # if a user application and the library use off_t of different sizes.
414
411 AC_CHECK_SIZEOF(off_t) 415 AC_CHECK_SIZEOF(off_t)
412 AC_CHECK_SIZEOF(long) 416 AC_CHECK_SIZEOF(long)
413 AC_CHECK_SIZEOF(long long) 417 AC_CHECK_SIZEOF(long long)
...@@ -446,8 +450,13 @@ extern char *strsignal (int); ...@@ -446,8 +450,13 @@ extern char *strsignal (int);
446 AC_CHECK_FUNCS(mkstemp sigaction sysconf getdelim setreuid \ 450 AC_CHECK_FUNCS(mkstemp sigaction sysconf getdelim setreuid \
447 setresuid seteuid setlocale vfork _exit) 451 setresuid seteuid setlocale vfork _exit)
448 452
453 AC_FUNC_FSEEKO
449 AC_FUNC_SETVBUF_REVERSED 454 AC_FUNC_SETVBUF_REVERSED
455
450 AH_BOTTOM([ 456 AH_BOTTOM([
457 #if !defined (HAVE_FSEEKO)
458 # define fseeko fseek
459 #endif
451 #if defined (SETVBUF_REVERSED) 460 #if defined (SETVBUF_REVERSED)
452 # define SETVBUF(str,buf,mode,size) setvbuf(str,mode,buf,size) 461 # define SETVBUF(str,buf,mode,size) setvbuf(str,mode,buf,size)
453 #else 462 #else
...@@ -1001,6 +1010,10 @@ AC_SUBST(LIBMU_SCM) ...@@ -1001,6 +1010,10 @@ AC_SUBST(LIBMU_SCM)
1001 AC_SUBST(LIBMU_SCM_DEPS) 1010 AC_SUBST(LIBMU_SCM_DEPS)
1002 AC_SUBST(GUILE_SITE_DATA) 1011 AC_SUBST(GUILE_SITE_DATA)
1003 AC_SUBST(GUILE_BUILT_SOURCES) 1012 AC_SUBST(GUILE_BUILT_SOURCES)
1013 AC_SUBST(MU_GUILE_SITE_DIR)
1014 AC_SUBST(MU_GUILE_SIEVE_MOD_DIR)
1015 AC_SUBST(MU_GUILE_SIEVE_SCRIPTS)
1016 AC_SUBST(MU_GUILE_SIEVE_MOD_DATA)
1004 1017
1005 if test x"$useguile" = x"yes"; then 1018 if test x"$useguile" = x"yes"; then
1006 MU_CHECK_GUILE(,[ 1019 MU_CHECK_GUILE(,[
...@@ -1013,6 +1026,10 @@ if test x"$useguile" = x"yes"; then ...@@ -1013,6 +1026,10 @@ if test x"$useguile" = x"yes"; then
1013 LIBMU_SCM=../libmu_scm/libmu_scm.la 1026 LIBMU_SCM=../libmu_scm/libmu_scm.la
1014 LIBMU_SCM_DEPS='${MU_LIB_MBOX} ${MU_LIB_IMAP} ${MU_LIB_POP} ${MU_LIB_MH} ${MU_LIB_MAILDIR}' 1027 LIBMU_SCM_DEPS='${MU_LIB_MBOX} ${MU_LIB_IMAP} ${MU_LIB_POP} ${MU_LIB_MH} ${MU_LIB_MAILDIR}'
1015 GUILE_SITE_DATA='$(GUILE_SITE_DATA_X)' 1028 GUILE_SITE_DATA='$(GUILE_SITE_DATA_X)'
1029 MU_GUILE_SITE_DIR='$(GUILE_SITE)/$(PACKAGE)'
1030 MU_GUILE_SIEVE_MOD_DIR='$(GUILE_SITE)/sieve-modules'
1031 MU_GUILE_SIEVE_SCRIPTS='$(MU_GUILE_SIEVE_SCRIPTS_X)'
1032 MU_GUILE_SIEVE_MOD_DATA='$(MU_GUILE_SIEVE_MOD_DATA_X)'
1016 GUILE_BUILT_SOURCES='$(GUILE_BUILT_SOURCES_X)' 1033 GUILE_BUILT_SOURCES='$(GUILE_BUILT_SOURCES_X)'
1017 case "$GUILE_VERSION" in 1034 case "$GUILE_VERSION" in
1018 14) GUILE_SNARF_VERSION="1.4";; 1035 14) GUILE_SNARF_VERSION="1.4";;
......