diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-07-04 20:06:36 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-07-04 20:06:36 -0700 |
commit | 6ba18a4639041f66160c0dff9778094a1e47ce3e (patch) | |
tree | 9446744f0754bb108b448cd90d241843114701e5 /Makefile | |
parent | 4fd7bddd0e7fda8c5e476cba5e7882dae86fd59d (diff) | |
download | txr-6ba18a4639041f66160c0dff9778094a1e47ce3e.tar.gz txr-6ba18a4639041f66160c0dff9778094a1e47ce3e.tar.bz2 txr-6ba18a4639041f66160c0dff9778094a1e47ce3e.zip |
configure: deal with non-standard libffi installations.
This addresses a failure to build with libffi on
Arch Linux, reported by Joe Eib.
* Makefile (opt/ffi.o, dbg/ffi.o): Pull LIBFFI_CFLAGS
into TXR_CFLAGS for just these object files.
* configure (have_pkgconfig, libffi_cflags): New variables.
(gen_config_make): Create new Makefile variable,
LIBFFI_CFLAGS, from libffi_cflags.
New configure test to detect pkg-config.
Libffi test falls back on using pkg-config to test for
existence of the library and to get the cflags and ldflags.
Any needed cflags end up in LIBFFI_CFLAGS and are used
only when compiling ffi.c.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -257,6 +257,10 @@ y.tab.c: $(top_srcdir)parser.y # Bison-generated parser also tests for this lint define. $(call EACH_CONF,y.tab.o): TXR_CFLAGS += -Dlint +opt/ffi.o: TXR_CFLAGS += $(LIBFFI_CFLAGS) + +dbg/ffi.o: TXR_CFLAGS += $(LIBFFI_CFLAGS) + # txr.c needs to know the relative datadir path to do some sysroot # calculations. |