public static function getDepsLocalPath()

in lib/php/libsdk/SDK/Config.php [349:385]


	public static function getDepsLocalPath() : ?string
	{/*{{{*/
		if (NULL == self::$depsLocalPath) {
			if (file_exists("Makefile")) {
				$s = file_get_contents("Makefile");

				if (preg_match(",PHP_BUILD=(.+),", $s, $m)) {
					if (isset($m[1])) {
						self::setDepsLocalPath(trim($m[1]));
					}
				}
			}
		}

		if (NULL == self::$depsLocalPath) {
			$tmp = dirname(getcwd()) . DIRECTORY_SEPARATOR . "deps";
			if (is_dir($tmp)) {
				self::setDepsLocalPath($tmp);
			}
		}
		
		if (NULL == self::$depsLocalPath) {
			$tmp = realpath("../deps");
			if (is_dir($tmp)) {
				self::setDepsLocalPath($tmp);
			}
		}

		if (NULL == self::$depsLocalPath) {
			if (file_exists("main/php_version.h")) {
				/* Deps dir might not exist. */
				self::setDepsLocalPath(realpath("..") . DIRECTORY_SEPARATOR . "deps");
			}
		}

		return self::$depsLocalPath;
	}/*}}}*/