Source: inchi Version: 1.03+dfsg-2 User: debian-cr...@lists.debian.org Usertags: ftcbfs Tags: patch upstream
inchi fails to cross build from source, because it uses the build architecture compiler. dh_auto_build passes a cross compiler via the standard variable CC, but inchi's makefile expects it in C_COMPILER and two other variables. The attached patch reworks the makefile to pick up CC by default while still honouring the users choice of C_COMPILER. Please consider applying it. Helmut
--- inchi-1.03+dfsg.orig/INCHI_API/gcc_so_makefile/makefile +++ inchi-1.03+dfsg/INCHI_API/gcc_so_makefile/makefile @@ -53,9 +53,14 @@ endif INCHI_MAIN_PATHNAME = $(LIB_DIR)/$(INCHI_MAIN_NAME) +# === C Compiler =============== +ifndef C_COMPILER + C_COMPILER = $(CC) +endif + # === Linker to create (Shared) InChI library ==== ifndef SHARED_LINK - SHARED_LINK = gcc -shared + SHARED_LINK = $(C_COMPILER) -shared endif # === Linker to create Main program ===== @@ -65,7 +70,7 @@ LINKER_CWD_PATH = -Wl,-R,"" endif endif - LINKER = gcc -s $(LINKER_CWD_PATH) + LINKER = $(C_COMPILER) -s $(LINKER_CWD_PATH) endif ifndef P_LIBR @@ -77,11 +82,6 @@ endif -# === C Compiler =============== -ifndef C_COMPILER - C_COMPILER = gcc -endif - # === C Compiler Options ======= ifndef C_OPTIONS C_OPTIONS = `dpkg-buildflags --get CPPFLAGS` -ansi `dpkg-buildflags --get CFLAGS` -c