Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,14 @@ ${NAME}: ${BUILD-DIR}

.PHONY: clean
clean:
ifneq ("$(wildcard ${BUILD-DIR})","")
meson compile --clean -C ${BUILD-DIR}
endif

.PHONY: purge
purge:
ifneq ("$(wildcard ${BUILD-DIR})","")
rm -rf ${BUILD-DIR}
meson subprojects purge --confirm
endif

.PHONY: purge
purge: clean

.PHONY: install
install: ${NAME}
meson install -C ${BUILD-DIR} --skip-subprojects
Expand Down
15 changes: 11 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,10 @@ conf.set10(
description: 'Is linux/mctp.h include-able?'
)

conf.set(
'HAVE_NETDB',
cc.links(
is_static = get_option('default_library') == 'static'
have_netdb = false
if not is_static
have_netdb = cc.links(
'''#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
Expand All @@ -228,9 +229,15 @@ conf.set(
}
''',
name: 'netdb',
),
)
endif

conf.set(
'HAVE_NETDB',
have_netdb,
description: 'Is network address and service translation available'
)

dl_dep = dependency('dl', required: false)
conf.set(
'HAVE_LIBC_DLSYM',
Expand Down