[gimp/wip/Jehan/incremental-win-installer-improvements: 1/2] configure: better libaa detection.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/wip/Jehan/incremental-win-installer-improvements: 1/2] configure: better libaa detection.
- Date: Sun, 16 May 2021 23:38:08 +0000 (UTC)
commit 3454080cf42e4717d37aac4c31cc7a03da87099e
Author: Jehan <jehan girinstud io>
Date: Sun May 16 02:35:04 2021 +0200
configure: better libaa detection.
- Use aalib-config (available at least in the last releases of libaa,
1.4rc5 from 20 years ago!). Especially important as the basic
AC_CHECK_LIB() test does not work in my tests on Windows builds
because some more libs are needed.
- Make sure file-aa is also built if AA_LIBS environment variable is
explicitly set. Current test was already not working in such case.
configure.ac | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d648f47ce1..33679d29a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1656,13 +1656,25 @@ AC_SUBST(MNG_CFLAGS)
AC_ARG_WITH(aa, [ --without-aa do not build the AA plug-in])
have_libaa=no
-if test "x$with_aa" != xno && test -z "$AA_LIBS"; then
+if test "x$with_aa" != xno; then
have_libaa=yes
- AC_CHECK_LIB(aa, aa_printf,
- [AC_CHECK_HEADER(aalib.h,
- FILE_AA='file-aa$(EXEEXT)'; AA_LIBS='-laa',
- [have_libaa="no (AA header file not found)"])],
- [have_libaa="no (AA library not found)"])
+ # First case if manually set, use the AA_LIBS environment variable.
+ if test -z "$AA_LIBS"; then
+ # Otherwise try the aalib-config script.
+ AA_LIBS=`aalib-config --libs`
+ if test -z "$AA_LIBS"; then
+ # Just try -laa.
+ AC_CHECK_LIB(aa, aa_printf,
+ [AC_CHECK_HEADER(aalib.h,
+ AA_LIBS='-laa',
+ [have_libaa="no (AA header file not found)"])],
+ [have_libaa="no (AA library not found)"])
+ fi
+ fi
+
+ if test "$have_libaa" = yes; then
+ FILE_AA='file-aa$(EXEEXT)'
+ fi
fi
AC_SUBST(FILE_AA)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]