diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-11-15 19:56:56 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2005-11-15 19:56:56 +0000 |
commit | e0653e1f24179d598c84855b7c86b5354aaedf4b (patch) | |
tree | 67fc48b74c9901588e0cc45d0f1e670e89f9880d /configure.ac | |
parent | 4a8e607d542a14146223022534362ee81a63898b (diff) | |
download | mailutils-e0653e1f24179d598c84855b7c86b5354aaedf4b.tar.gz mailutils-e0653e1f24179d598c84855b7c86b5354aaedf4b.tar.bz2 |
Determine the size of off_t and define an
equivalent mu_off_t type. We cannot use off_t in the library since
its size depends on whether large file support is used or not,
which will lead to arbitrary crashes if a user application and the
library use off_t of different sizes.
(MU_COMMON_INCLUDES): New substitute variable
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index ae3f2a337..1d7a2c9a7 100644 --- a/configure.ac +++ b/configure.ac @@ -372,6 +372,23 @@ m4_copy([MU_SAVE_AC_LIBOBJ],[AC_LIBOBJ]) libmuaux_GNULIB +##### +# Determine the size of off_t and define an equivalent mu_off_t type. +# We cannot use off_t in the library since its size depends on whether +# large file support is used or not, which will lead to arbitrary crashes +# if a user application and the library use off_t of different sizes. +AC_CHECK_SIZEOF(off_t) +AC_CHECK_SIZEOF(long) +AC_CHECK_SIZEOF(long long) +AC_SUBST(MU_OFF_TYPE) +if test $ac_cv_sizeof_off_t -eq $ac_cv_sizeof_long; then + MU_OFF_TYPE=long +elif test $ac_cv_sizeof_off_t -eq $ac_cv_sizeof_long_long; then + MU_OFF_TYPE="long long" +else + AC_MSG_ERROR([Cannot find ${ac_cv_sizeof_off_t}-byte type, suitable for mu_off_t]) +fi + AC_FUNC_MMAP AC_CHECK_DECLS([strtok_r, strchrnul, strndup, asprintf, vasprintf, strsignal], @@ -971,6 +988,7 @@ LTLIBOBJS=`echo "$LIB@&t@OBJS" | AC_SUBST(LTLIBOBJS) S=`echo "$MU_LIBOBJS" | + tr ' ' '\n' | sort | uniq | tr '\n' ' ' | sed 's,\.[[^.]]* ,$U&,g;s,\.[[^.]]*$,$U&,'` MU_LTLIBOBJS=`echo "$S" | sed 's,\.[[^.]]* ,.lo ,g;s,\.[[^.]]*$,.lo,'` @@ -982,6 +1000,9 @@ SIEVE_MODDIR='$(libdir)/$(PACKAGE)' AC_SUBST(MU_COMMON_LIBRARIES) MU_COMMON_LIBRARIES='$(LTLIBINTL) $(LTLIBICONV)' +AC_SUBST(MU_COMMON_INCLUDES) +MU_COMMON_INCLUDES='-I${srcdir} -I${top_srcdir}/include -I${top_srcdir}/lib -I${top_builddir} -I${top_builddir}/include -I${top_builddir}/include/mailutils/gnu -I${top_srcdir}/mailbox' + ### Display the status AC_CONFIG_COMMANDS([status],[ |