From 25199271780af0c776b4d267a0e7fabb05562b02 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Sun, 2 Oct 2022 22:31:50 +0200 Subject: [PATCH] Fix build in case of no MPFR and warnings are treated as errors. --- example/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/Makefile b/example/Makefile index 66ffa258..d7391d91 100644 --- a/example/Makefile +++ b/example/Makefile @@ -39,7 +39,7 @@ all: config config: printf "#include \nint main(void){mpz_t z; mpz_init(z); return 0;}\n" > config-test.c - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -I$(GMP_DIR)/include -L$(GMP_DIR)/lib config-test.c -lgmp -o config-test.exe 2> /dev/null && echo "-DHAVE_GMP=1 -I$(GMP_DIR)/include -L$(GMP_DIR)/lib -lgmp" > config || echo "-DHAVE_GMP=0" > config + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -I$(GMP_DIR)/include -L$(GMP_DIR)/lib config-test.c -lgmp -o config-test.exe 2> /dev/null && echo "-DHAVE_GMP=1 -DHAVE_MPFR=0 -I$(GMP_DIR)/include -L$(GMP_DIR)/lib -lgmp" > config || echo "-DHAVE_GMP=0 -DHAVE_MPFR=0 " > config printf "#include \nint main(void){mpfr_t z; mpfr_init(z); return 0;}\n" > config-test.c $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -I$(GMP_DIR)/include -I$(MPFR_DIR)/include -L$(GMP_DIR)/lib -L$(MPFR_DIR)/lib config-test.c -lmpfr -lgmp -o config-test.exe 2> /dev/null && echo "-DHAVE_GMP=1 -DHAVE_MPFR=1 -I$(GMP_DIR)/include -L$(GMP_DIR)/lib -I$(MPFR_DIR)/include -L$(MPFR_DIR)/lib -lmpfr -lgmp" > config || echo "MPFR not available" $(RM) config-test.c config-test.exe