When cross-compiling graphviz the host tries to run mkdefs to generate
gdefs.h, which then fails with something like:
```
/bin/sh: ./mkdefs: cannot execute binary file: Exec format error
```
To work around this we can introduce a variable $(HOSTCC), which expands
to the standard compiler, `$(CC)`, unless the user has run
`export HOSTCC=some-host-compiler` or similar before configuring.
pdfdir = $(pkgdatadir)/doc/pdf
pkgconfigdir = $(libdir)/pkgconfig
-
+HOSTCC ?= $(CC)
GVPR_VERSION="2:0:0"
AM_CPPFLAGS = \
-DDFLT_GVPRPATH="\".$(PATH_SEPARATOR)$(pkgdatadir)/gvpr\""
pkginclude_HEADERS = gvpr.h
-noinst_PROGRAMS = mkdefs
noinst_HEADERS = actions.h compile.h gprstate.h parse.h queue.h trieFA.h trie.c
noinst_LTLIBRARIES = libgvpr_C.la
lib_LTLIBRARIES = libgvpr.la
libgvpr_la_LDFLAGS += -export-symbols-regex gvpr
endif
-mkdefs_SOURCES = mkdefs.c
+mkdefs$(EXEEXT):
+ $(HOSTCC) $(srcdir)/mkdefs.c -o mkdefs$(EXEEXT)
gdefs.h: $(top_srcdir)/lib/gvpr/gprdata mkdefs$(EXEEXT)
./mkdefs$(EXEEXT) gdefs.h < $(top_srcdir)/lib/gvpr/gprdata