configure: add --with-lfs option

We are forcibly use the LFS (64-bit) calls in the source now. Add a new
check to the configure script and use compatibility defines when those
calls are not available for a reason.

Fixes: https://github.com/alsa-project/alsa-lib/pull/223
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2022-05-20 09:52:54 +02:00
parent 4fb83669ef
commit a513e65e19
2 changed files with 30 additions and 0 deletions

View file

@ -235,6 +235,26 @@ if test "$softfloat" != "yes"; then
ALSA_DEPLIBS="-lm"
fi
dnl Check for scandir64
AC_MSG_CHECKING(for LFS calls)
lfs=
AC_ARG_WITH(lfs,
AS_HELP_STRING([--with-lfs], [Use LFS calls (default = yes)]),
[ have_lfs="$withval" ], [ have_lfs="yes" ])
HAVE_LIBDL=
if test "$have_lfs" = "yes"; then
AC_TRY_LINK([#include <dirent.h>],
[struct dirent64 a; ],
[have_lfs=yes],
[have_lfs=no])
fi
if test "$have_lfs" = "yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_LFS], 1, [Have LFS])
else
AC_MSG_RESULT(no)
fi
dnl Check for libdl
AC_MSG_CHECKING(for libdl)
AC_ARG_WITH(libdl,