From 4c05dde2b3e1a6ee98e53430a0ce39a8b28750a6 Mon Sep 17 00:00:00 2001 From: Raul Infante-Sainz Date: Mon, 13 Jan 2020 15:06:39 +0000 Subject: Adding X11 libraries path to LDFLAGS in Ghostscript installation Until this commit, the checking of X11 installation done to ensure that it is already available in the host system was crashing in macOS systems. The reason is that the place of the X11 libraries use to be `/opt/X11/lib' in macOS systems. With this commit, this issue has been fixed by adding this directory to the LDFLAGS. --- reproduce/software/make/high-level.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'reproduce/software') diff --git a/reproduce/software/make/high-level.mk b/reproduce/software/make/high-level.mk index 2b9b13f..f46480a 100644 --- a/reproduce/software/make/high-level.mk +++ b/reproduce/software/make/high-level.mk @@ -888,6 +888,8 @@ $(ibidir)/ghostscript: $(ibidir)/libpng \ # First we need to make sure some necessary X11 libraries that we # don't yet install in this template are present on the host # system, see https://savannah.nongnu.org/task/?15481 . + # Adding `-L/opt/X11/lib' to LDFLAGS is necessary for macOS systems + # because X11 libraries used to be installed there. echo; echo "Template: testing necessary X11 libraries for ghostscript" echo "---------------------------------------------------------" @@ -895,7 +897,8 @@ $(ibidir)/ghostscript: $(ibidir)/libpng \ cprog=$(ddir)/libXext-test-for-ghostscript.c echo "#include " > $$cprog echo "int main(void) {return 0;}" >> $$cprog - if $$CC $$cprog -o$$oprog -lXt -lSM -lICE -lXext; then + export LDFLAGS="$$LDFLAGS -L/opt/X11/lib" + if $$CC $$LDFLAGS $$cprog -o$$oprog -lXt -lSM -lICE -lXext; then echo "Necessary X11 libraries are present. Proceeding to the build." rm $$cprog $$oprog else -- cgit v1.2.1