branch: externals/pq commit 1048d41b99343b5fe9afef2461a7eab9e9fd1b98 Author: Mario Rodas <mar...@users.noreply.github.com> Commit: Mario Rodas <mar...@users.noreply.github.com>
Use pg_config to detect postgresql include directory --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e61c75dc8e..0376e3687d 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ +PG_CONFIG = pg_config +PGINCLUDEDIR := $(shell $(PG_CONFIG) --pkgincludedir) + CC = gcc -CFLAGS = -I$(HOME)/ext/emacs/src/ -I /usr/include/postgresql/ -std=gnu99 -ggdb3 -Wall -fPIC +CFLAGS = -I$(HOME)/ext/emacs/src/ -I$(PGINCLUDEDIR) -std=gnu99 -ggdb3 -Wall -fPIC LDFLAGS = -lpq ifeq ($(OS),Windows_NT)