Skip to content

Commit

Permalink
Add WITHOUTURL to build system, prefer /usr/bin/curl-config
Browse files Browse the repository at this point in the history
  • Loading branch information
chad-earthscope committed Mar 18, 2024
1 parent d2ff714 commit ddb7710
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
21 changes: 15 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/mseedconvert.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <mseedformat.h>
#include <yyjson.h>

#define VERSION "1.0.1"
#define VERSION "1.0.2"
#define PACKAGE "mseedconvert"

static int8_t verbose = 0;
Expand Down

0 comments on commit ddb7710

Please sign in to comment.