summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2015-11-29 08:42:56 +1000
committerAllan McRae <allan@archlinux.org>2015-12-04 11:06:49 +1000
commit088649534e7fd493cab4fce335f50a68108a48a6 (patch)
tree83d92821905edbbabfe9d6779da081c7021b9a88 /configure.ac
parentdfa4dcb16d42a84a76ed22792f681190aaa60b31 (diff)
downloadpacman-088649534e7fd493cab4fce335f50a68108a48a6.tar.xz
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>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 359d61bf..60bb8376 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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