Add large file support CFLAGS to pkgconfig file

Large file support is enabled by our configure script as required.  If anything
linking to libalpm does not also define large file support, there will be
differences in the size of off_t which are not caught until runtime.

Add the required CFLAGS to the pkg-config file so that users of libalpm know
what flags are required.

Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Allan McRae 2015-11-29 08:42:56 +10:00
parent dfa4dcb16d
commit 088649534e
2 changed files with 10 additions and 1 deletions

View File

@ -165,6 +165,15 @@ AC_ARG_ENABLE(git-version,
# testing compilation against gpgme).
AC_SYS_LARGEFILE
# Record large file flags in pkgconfig file
if test "$enable_largefile" != no; then
if test "$ac_cv_sys_file_offset_bits" != 'no'; then
LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
fi
fi
AC_SUBST(LFS_CFLAGS)
# Checks for programs.
AC_PROG_AWK
AC_PROG_CC_C99

View File

@ -7,6 +7,6 @@ Name: libalpm
Description: Arch Linux package management library
URL: http://www.archlinux.org/pacman/
Version: @LIB_VERSION@
Cflags: -I${includedir}
Cflags: -I${includedir} @LFS_CFLAGS@
Libs: -L${libdir} -lalpm
Libs.private: @LIBS@ @LIBARCHIVE_LIBS@ @LIBSSL_LIBS@ @LIBCURL_LIBS@ @GPGME_LIBS@