diff --git a/libc3/window/sdl2/configure b/libc3/window/sdl2/configure
index 3bce5d4..e2e917d 100755
--- a/libc3/window/sdl2/configure
+++ b/libc3/window/sdl2/configure
@@ -49,6 +49,7 @@ pkg_config glu
pkg_config sdl2
pkg_config libbsd-overlay
config_lib OPENGL -framework OpenGL
+config_lib SDL2 -framework SDL2
config_define PREFIX "\"${PREFIX}\""
# Address Sanitizer config
diff --git a/libc3/window/sdl2/demo/configure b/libc3/window/sdl2/demo/configure
index d6c5344..f17e6e8 100755
--- a/libc3/window/sdl2/demo/configure
+++ b/libc3/window/sdl2/demo/configure
@@ -54,6 +54,7 @@ pkg_config gl
pkg_config glu
pkg_config sdl2
config_lib OPENGL -framework OpenGL
+config_lib SDL2 -framework SDL2
LIBS="$LIBS"
# Asan config
diff --git a/libc3/window/sdl2/demo/macos/configure b/libc3/window/sdl2/demo/macos/configure
index a1ac9f0..b639bb0 100755
--- a/libc3/window/sdl2/demo/macos/configure
+++ b/libc3/window/sdl2/demo/macos/configure
@@ -52,7 +52,7 @@ echo "${APP_PROG}: ../.libs/${PROG}" >> ${CONFIG_MK}
echo " mkdir -p ${APP}/Contents/MacOS" >> ${CONFIG_MK}
echo " cp ../.libs/${PROG} ${APP_PROG}" >> ${CONFIG_MK}
-BUNDLE_LIBS_COMMON="/opt/homebrew/opt/sdl2/lib/libSDL2-2.0.0.dylib ../../../../../libffi/.libs/libffi.8.dylib"
+BUNDLE_LIBS_COMMON="/usr/local/lib/libSDL2-2.0.0.dylib ../../../../../libffi/.libs/libffi.8.dylib"
BUNDLE_LIBS="${BUNDLE_LIBS_COMMON} ../../../../.libs/libc3.0.dylib ../../../.libs/libc3_window.0.dylib ../../.libs/libc3_window_sdl2.0.dylib"
echo >> ${CONFIG_MK}
@@ -63,7 +63,7 @@ for BUNDLE_LIB in ${BUNDLE_LIBS}; do
L=$(basename $BUNDLE_LIB)
echo " install_name_tool -id @executable_path/../Frameworks/ ${APP}/Contents/Frameworks/$L" >> ${CONFIG_MK}
echo " install_name_tool -change ${LIBDIR}/$L @executable_path/../Frameworks/$L ${APP}/Contents/MacOS/${PROG}" >> ${CONFIG_MK}
- echo " DEPS=\$\$(otool -L '${BUNDLE_LIB}' | awk '/^\t.+(\/usr\/lib|\/System)/ { next } /^\t/ { print \$\$1 }'); for DEP in \$\${DEPS}; do D=\$\$(basename \"\$\${DEP}\"); if [ -f ${APP}/Contents/Frameworks/\$\$D ]; then install_name_tool -change \$\${DEP} @executable_path/../Frameworks/\$\$D ${APP}/Contents/Frameworks/$L; fi; done" >> ${CONFIG_MK}
+ echo " DEPS=\$\$(otool -L '${BUNDLE_LIB}' | awk '/^\t.+(\/usr\/lib|\/System)/ { next } /^\t/ { print \$\$1 }'); for DEP in \$\${DEPS}; do D=\$\$(basename \"\$\${DEP}\"); if [ -f ${APP}/Contents/Frameworks/\$\$D ]; then install_name_tool -change \$\${DEP} @executable_path/../Frameworks/\$\$D ${APP}/Contents/Frameworks/$L; install_name_tool -add_rpath @executable_path/../Frameworks ${APP}/Contents/Frameworks/\$\$D; fi; done" >> ${CONFIG_MK}
done
echo >> ${CONFIG_MK}
echo ".PHONY: \\" >> ${CONFIG_MK}