diff --git a/lib/common_test/test_server/ts_install.erl b/lib/common_test/test_server/ts_install.erl index 1951e77741f8..23a0398f262a 100644 --- a/lib/common_test/test_server/ts_install.erl +++ b/lib/common_test/test_server/ts_install.erl @@ -118,15 +118,17 @@ unix_autoconf(XConf) -> Env = proplists:get_value(crossenv,XConf,[]), Host = get_xcomp_flag("host", Flags), Build = get_xcomp_flag("build", Flags), + ConfigFlags = string:trim(proplists:get_value("configure_flags", Flags, ""),both,"\"") + ++ " " ++ os:getenv("CONFIG_FLAGS", ""), Threads = [" --enable-shlib-thread-safety" || erlang:system_info(threads) /= false], Debug = [" --enable-debug-mode" || string:find(erlang:system_info(system_version),"debug") =/= nomatch], - MXX_Build = [[$\s | Y] || Y <- string:lexemes(os:getenv("CONFIG_FLAGS", ""), " \t\n"), + MXX_Build = [[$\s | Y] || Y <- string:lexemes(ConfigFlags, " \t\n"), Y == "--enable-m64-build" orelse Y == "--enable-m32-build" orelse Y == "--disable-year2038"], - Args = Host ++ Build ++ Threads ++ Debug ++ " " ++ MXX_Build, + Args = Host ++ Build ++ Threads ++ Debug ++ MXX_Build, case filelib:is_file(Configure) of true -> OSXEnv = macosx_cflags(), @@ -184,7 +186,7 @@ get_xcomp_flag(Flag, Flags) -> get_xcomp_flag(Flag, Tag, Flags) -> case proplists:get_value(Flag,Flags) of undefined -> ""; - "guess" -> [" --",Tag,"=",os:cmd("$ERL_TOP/make/autoconf/config.guess")]; + "guess" -> [" --",Tag,"=",string:trim(os:cmd("$ERL_TOP/make/autoconf/config.guess"))]; HostVal -> [" --",Tag,"=",HostVal] end.