From: Jean Privat Date: Fri, 26 Jan 2018 21:12:15 +0000 (-0500) Subject: Merge: nitc: check pkg-config packages availability later X-Git-Url: http://nitlanguage.org Merge: nitc: check pkg-config packages availability later The `pkgconfig` annotation tells the compiler to use the `pkg-config` command in order to get the C compiler and linker options required to build the user C code. The availability of each package was tested twice, once at reading the annotation and once in the generated Makefile. This PR moves the first check later, with the generation of the Makefile. There is still two checks, one by the Nit compiler with a prettier output, and one by the Makefile in case it is distributed with the generated C source files. This fixes an issue we've had when compiling for Android and iOS, where the result of the annotation was not used but still blocked the compilation if the host did not have the package. And leaving the check to the Makefile give a chance to the programmer to tweak it before the C compilation when cross-compiling. The error message thrown by the Makefile is less user-friendly as we lose the reference to the Nit source file and line number. This should not be much on an issue since it is rarely a programming error, more of a system configuration error, but it could be improved upon if it becomes an issue. Pull-Request: #2610 Reviewed-by: Jean Privat --- bb5ac13ecaf7c5d2677bce450a118da01068fde1