Skip to content

WIndows Makeconf masks user-specified zlib.h

1 message · Martin Morgan

#
On windows under current R-devel (r57066), R CMD INSTALL, for instance, 
invokes gcc with -I"$(R_HOME)/include" prior to any user-defined include 
paths. This means that a package cannot specify an alternative zlib.h, 
as a (reduced) version of this is in $(R_HOME)/include.

One way around this is to redefine .o rules

%.o: %.c
	$(CC) $(MY_ZFLAGS) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -c $< -o $@

Is there a better way? Can the ordering of the include search path be 
altered in src/gnuwin32/fixed/etc/Makeconf:160-161?

Martin