'sources' : files(
'imdsd.c',
'imds-util.c'
- ) + curl_util_c,
+ ),
+ 'link_with' : [libcurlutil_static, libshared],
'dependencies' : [libcurl],
},
libexec_template + {
'pull-oci.c',
'pull-raw.c',
'pull-tar.c',
- ) + curl_util_c,
+ ),
'objects' : ['systemd-importd'],
+ 'link_with' : [libcurlutil_static, libshared],
'dependencies' : common_deps + [
libopenssl,
],
shared_sources += files('tests.c')
endif
-# A small shared file that is is linked into a few places
-curl_util_c = files('curl-util.c')
-
syscall_list_inc = custom_target(
input : syscall_list_txt,
output : 'syscall-list.inc',
userspace],
c_args : ['-fvisibility=default'],
build_by_default : false)
+
+# A small shared file that is linked into a few places.
+# It is not part of libshared because this code needs libcurl and
+# we don't want to link libshared to libcurl.
+if conf.get('HAVE_LIBCURL') == 1
+ libcurlutil_static = static_library(
+ 'curl-util',
+ 'curl-util.c',
+ implicit_include_directories : false,
+ dependencies : [userspace, libcurl],
+ include_directories : includes,
+ build_by_default : false)
+else
+ libcurlutil_static = []
+endif