--- a/scripts/common.php +++ b/scripts/common.php @@ -63,12 +63,20 @@ function check_compiler() } } } + if (getenv("CXXFLAGS")) + { + $compiler .= " ".getenv("CXXFLAGS"); + } } function get_link_flags() { global $is_windows_target; - $flags = " -L".__DIR__."/../src/vendor/Soup -lsoup"; + $srcdir = __DIR__."/../src"; + $flags .= " -L$srcdir/vendor/Soup -L$srcdir -lsoup"; + if (getenv("LDFLAGS")) { + $flags .= " ".getenv("LDFLAGS"); + } if ($is_windows_target) { $flags .= " -lws2_32 -lbcrypt";