1diff --git a/buildconfig/config_darwin.py b/buildconfig/config_darwin.py
2index c785e183..37d5cea4 100644
3--- a/buildconfig/config_darwin.py
4+++ b/buildconfig/config_darwin.py
5@@ -146,16 +146,8 @@ def main():
6 ])
7
8 print ('Hunting dependencies...')
9- incdirs = ['/usr/local/include', '/opt/homebrew/include']
10- incdirs.extend(['/usr/local/include/SDL2', '/opt/homebrew/include/SDL2', '/opt/local/include/SDL2'])
11-
12- incdirs.extend([
13- #'/usr/X11/include',
14- '/opt/local/include',
15- '/opt/local/include/freetype2/freetype']
16- )
17- #libdirs = ['/usr/local/lib', '/usr/X11/lib', '/opt/local/lib']
18- libdirs = ['/usr/local/lib', '/opt/local/lib', '/opt/homebrew/lib']
19+ incdirs = @buildinputs_include@
20+ libdirs = @buildinputs_lib@
21
22 for d in DEPS:
23 if isinstance(d, (list, tuple)):
24diff --git a/buildconfig/config_unix.py b/buildconfig/config_unix.py
25index 5c50bcdc..2fd69e2d 100644
26--- a/buildconfig/config_unix.py
27+++ b/buildconfig/config_unix.py
28@@ -210,18 +210,8 @@ def main():
29 if not DEPS[0].found:
30 raise RuntimeError('Unable to run "sdl-config". Please make sure a development version of SDL is installed.')
31
32- incdirs = []
33- libdirs = []
34- for extrabase in extrabases:
35- incdirs += [extrabase + d for d in origincdirs]
36- libdirs += [extrabase + d for d in origlibdirs]
37- incdirs += ["/usr"+d for d in origincdirs]
38- libdirs += ["/usr"+d for d in origlibdirs]
39- incdirs += ["/usr/local"+d for d in origincdirs]
40- libdirs += ["/usr/local"+d for d in origlibdirs]
41- if localbase:
42- incdirs = [localbase+d for d in origincdirs]
43- libdirs = [localbase+d for d in origlibdirs]
44+ incdirs = @buildinputs_include@
45+ libdirs = @buildinputs_lib@
46
47 for arg in DEPS[0].cflags.split():
48 if arg[:2] == '-I':