Permalink
Browse files

add check for YAWS_DISABLE_PAM to rebar.config.script

Setting the OS environment variable YAWS_DISABLE_PAM to any value causes
rebar builds to avoid building pam. This is equivalent to using the
--disable-pam option with configure, and is useful for building in
environments where pam development files are not available.
  • Loading branch information...
1 parent 754f56e commit db48102e1cf693b59f95e5ba93e36e110a934ff0 @vinoski vinoski committed Mar 25, 2014
Showing with 7 additions and 1 deletion.
  1. +7 −1 rebar.config.script
View
@@ -41,7 +41,13 @@ PortEnv0 = case lists:keyfind(port_env, 1, Cfg0) of
false -> []
end,
PortSpecs0 = case lists:keyfind(port_specs, 1, Cfg0) of
- {port_specs, PSpecs} -> PSpecs;
+ {port_specs, PSpecs} ->
+ case os:getenv("YAWS_DISABLE_PAM") of
+ false ->
+ PSpecs;
+ _ ->
+ lists:keydelete("priv/lib/epam.so", 1, PSpecs)
+ end;
false -> []
end,

0 comments on commit db48102

Please sign in to comment.