From 18b1bd9518da8228f1636fd53c7cd6a4acbedac9 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Thu, 28 Apr 2022 23:06:41 +0200 Subject: [PATCH] Fix makefile if MPFR not found --- example/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/Makefile b/example/Makefile index b67db4d6..1e43f7f3 100644 --- a/example/Makefile +++ b/example/Makefile @@ -41,7 +41,7 @@ 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 -lgmp config-test.c -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 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 -lmpfr -lgmp config-test.c -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 ) + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -I$(GMP_DIR)/include -I$(MPFR_DIR)/include -L$(GMP_DIR)/lib -L$(MPFR_DIR)/lib -lmpfr -lgmp config-test.c -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 clean: