From ddb77108df92659aff9472aaf0b59fb94228394e Mon Sep 17 00:00:00 2001 From: chad-earthscope Date: Mon, 18 Mar 2024 14:28:58 -0700 Subject: [PATCH] Add WITHOUTURL to build system, prefer /usr/bin/curl-config --- Makefile | 21 +++++++++++++++------ src/mseedconvert.c | 2 +- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index e0d7527..526f508 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,19 @@ # Automatically configure URL support if libcurl is present -# Test for curl-config command and add build options if so -ifneq (,$(shell command -v curl-config)) - export LM_CURL_VERSION=$(shell curl-config --version) - export CFLAGS:=$(CFLAGS) -DLIBMSEED_URL - export LDFLAGS:=$(LDFLAGS) $(shell curl-config --libs) - $(info Configured with $(LM_CURL_VERSION)) +# Test for curl-config command and add build options if found +# Prefer /usr/bin/curl-config over any other curl-config +ifndef WITHOUTURL + ifneq (,$(wildcard /usr/bin/curl-config)) + CURL_CONFIG := /usr/bin/curl-config + else ifneq (,$(shell command -v curl-config)) + CURL_CONFIG := $(shell command -v curl-config) + endif +endif + +ifneq (,$(CURL_CONFIG)) + export LM_CURL_VERSION=$(shell $(CURL_CONFIG) --version) + export CFLAGS:=$(CFLAGS) -DLIBMSEED_URL + export LDFLAGS:=$(LDFLAGS) $(shell $(CURL_CONFIG) --libs) + $(info Configured with $(LM_CURL_VERSION)) endif .PHONY: all clean diff --git a/src/mseedconvert.c b/src/mseedconvert.c index cab9a66..d78a435 100644 --- a/src/mseedconvert.c +++ b/src/mseedconvert.c @@ -21,7 +21,7 @@ #include #include -#define VERSION "1.0.1" +#define VERSION "1.0.2" #define PACKAGE "mseedconvert" static int8_t verbose = 0;