gh-102151: Correctly fetch CONFIG_ARGS in Tools/freeze/test/freeze.py (GH-102152)

(cherry picked from commit c3a178398c199038f3a0891d09f0363ec73f3b38)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
diff --git a/Tools/freeze/test/freeze.py b/Tools/freeze/test/freeze.py
index b4c76ff..f6a5adb 100644
--- a/Tools/freeze/test/freeze.py
+++ b/Tools/freeze/test/freeze.py
@@ -153,7 +153,7 @@ def prepare(script=None, outdir=None):
     print(f'configuring python in {builddir}...')
     cmd = [
         os.path.join(srcdir, 'configure'),
-        *shlex.split(get_config_var(builddir, 'CONFIG_ARGS') or ''),
+        *shlex.split(get_config_var(srcdir, 'CONFIG_ARGS') or ''),
     ]
     ensure_opt(cmd, 'cache-file', os.path.join(outdir, 'python-config.cache'))
     prefix = os.path.join(outdir, 'python-installation')