1diff --git a/buildconfig/config_darwin.py b/buildconfig/config_darwin.py
2index 9503ea70..d0d3ab6e 100644
3--- a/buildconfig/config_darwin.py
4+++ b/buildconfig/config_darwin.py
5@@ -140,16 +140,8 @@ def main(auto_config=False):
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 3eba5b5c..53cc6233 100644
26--- a/buildconfig/config_unix.py
27+++ b/buildconfig/config_unix.py
28@@ -240,11 +240,8 @@ def main(auto_config=False):
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 = @buildinputs_include@
38+ libdirs = @buildinputs_lib@
39
40 for arg in DEPS[0].cflags.split():
41 if arg[:2] == '-I':