diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -29,12 +29,18 @@ endef PROBED:= \ $(call probe_fun,string.h,memmem) \ - $(call probe_fun,string.h,strdup) \ - $(call probe_fun,stdio.h,fileno) + $(call probe_fun,string.h,strdup) CFLAGS+=$(PROBED) TESTS_CFLAGS+=$(PROBED) +FS_FLAG:=$(shell printf '#include "compat.h"\n#include <stdio.h>\nint main(void){\n#ifdef _WIN32\n_fileno;\n#else\nfileno;\n#endif\nreturn 0;}' \ + | $(CC) $(CFLAGS) -x c - -o /dev/null 2>/dev/null \ + || echo -DNO_FS) + +CFLAGS+=$(FS_FLAG) +TESTS_CFLAGS+=$(FS_FLAG) + both: CLEANUP=true both: clean shared static @$(MAKE) clean --no-print-directory |
