1diff --git a/hotdoc/extensions/c/c_extension.py b/hotdoc/extensions/c/c_extension.py
2index 1cfd5b3..cff20c8 100644
3--- a/hotdoc/extensions/c/c_extension.py
4+++ b/hotdoc/extensions/c/c_extension.py
5@@ -89,7 +89,7 @@ def get_clang_headers():
6 try:
7 # Clang 5.0+ can tell us directly
8 resource_dir = subprocess.check_output(
9- ['clang', '--print-resource-dir']).strip().decode()
10+ ['@clang@', '--print-resource-dir']).strip().decode()
11 if len(resource_dir) > 0:
12 include_dir = os.path.join(resource_dir, 'include')
13 if os.path.exists(include_dir):
14diff --git a/hotdoc/extensions/c/clang/cindex.py b/hotdoc/extensions/c/clang/cindex.py
15index fc93fda..2eb8eaf 100644
16--- a/hotdoc/extensions/c/clang/cindex.py
17+++ b/hotdoc/extensions/c/clang/cindex.py
18@@ -3937,20 +3937,23 @@ class Config:
19 if Config.library_file:
20 return Config.library_file
21
22- import platform
23- name = platform.system()
24+ if Config.library_path:
25+ import platform
26+ name = platform.system()
27
28- if name == 'Darwin':
29- file = 'libclang.dylib'
30- elif name == 'Windows':
31- file = 'libclang.dll'
32- else:
33- file = 'libclang.so'
34+ if name == 'Darwin':
35+ file = 'libclang.dylib'
36+ elif name == 'Windows':
37+ file = 'libclang.dll'
38+ else:
39+ file = 'libclang.so'
40
41- if Config.library_path:
42- file = Config.library_path + '/' + file
43+ if Config.library_path:
44+ file = Config.library_path + '/' + file
45+
46+ return file
47
48- return file
49+ return "@libclang@"
50
51 def get_cindex_library(self):
52 try: