EXTENSION = http DATA = $(wildcard *.sql) PGFILEDESC = "HTTP client for PostgreSQL, retrieve a web page from inside the database." #local only with "docker run -d -p 9080:80 kennethreitz/httpbin" #REGRESS = http http-ver MODULE_big = http OBJS = http.o UNAME := $(shell uname) ifeq ($(UNAME), Linux) CURL_CONFIG = curl-config CURL_INC := $(shell $(CURL_CONFIG) --cflags) ifeq ($(CURL_INC),) CURL_INC := -I/usr/local/include endif PG_CPPFLAGS = $(CURL_INC) SHLIB_LINK = $(shell $(CURL_CONFIG) --libs) else PG_CPPFLAGS = -Iwincurl SHLIB_LINK = -lcurl endif ifdef USE_PGXS PGXS := $(shell pg_config --pgxs) include $(PGXS) else subdir = contrib/http top_builddir = ../.. include $(top_builddir)/src/Makefile.global include $(top_srcdir)/contrib/contrib-global.mk endif