]> granicus.if.org Git - ejabberd/commitdiff
Pass {C,CPP,LD}FLAGS used in main ./configure call to invocations from deps
authorPaweł Chmielowski <pchmielowski@process-one.net>
Tue, 20 Oct 2015 13:22:39 +0000 (15:22 +0200)
committerPaweł Chmielowski <pchmielowski@process-one.net>
Tue, 20 Oct 2015 13:23:23 +0000 (15:23 +0200)
configure.ac
rebar.config.script
vars.config.in

index d30a490d0805440537748c2ea5025d5faacf460e..c7e7bcd4ad2fcabb1d2996f46dc19af989f7561a 100644 (file)
@@ -273,5 +273,8 @@ AC_SUBST(iconv)
 AC_SUBST(debug)
 AC_SUBST(lager)
 AC_SUBST(tools)
+AC_SUBST(CFLAGS)
+AC_SUBST(CPPFLAGS)
+AC_SUBST(LDFLAGS)
 
 AC_OUTPUT
index 633433c197bc8d93d79e340e0eaed77a411be1e4..e0a8923cfc0337b578b6a4c7058359076a46e90b 100644 (file)
@@ -66,10 +66,15 @@ Deps = [{p1_cache_tab, ".*", {git, "https://github.com/processone/cache_tab"}},
         {oauth2, ".*", {git, "https://github.com/prefiks/oauth2.git"}},
         {xmlrpc, ".*", {git, "https://github.com/rds13/xmlrpc.git"}}],
 
+CFLags = proplists:get_value(cflags, Cfg, ""),
+CPPFLags = proplists:get_value(cppflags, Cfg, ""),
+LDFLags = proplists:get_value(ldflags, Cfg, ""),
+
 ConfigureCmd = fun(Pkg, Flags) ->
                        {'get-deps',
                         "sh -c 'cd deps/" ++ Pkg ++
-                            " && ./configure" ++ Flags ++ "'"}
+                            " && CFLAGS=\""++ CFLags ++"\" CPPFLAGS=\""++ CPPFLags ++"\" LDFLAGS=\""++ LDFLags ++"\"" ++
+                            " ./configure" ++ Flags ++ "'"}
                end,
 
 XMLFlags = lists:foldl(
index 2cd5d8e9a6fd1710d0270f4a294e8489554563c6..69cc516f7efce3e22cbe183c5792d5726c6a0227 100644 (file)
 {libdir, "{{release_dir}}/lib"}.
 {docdir, "{{release_dir}}/doc"}.
 
+{ldflags, "@LDFLAGS@"}.
+{cflags, "@CFLAGS@"}.
+{cppflags, "@CPPFLAGS@"}.
+
 %% Local Variables:
 %% mode: erlang
 %% End: