From e1f00cbf9641dadd84fc76818c157389a0da3108 Mon Sep 17 00:00:00 2001 From: "roberto@precise64" Date: Sat, 11 Feb 2012 17:20:47 +0100 Subject: [PATCH] better erlang detection --- plugins/erlang/uwsgiplugin.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/erlang/uwsgiplugin.py b/plugins/erlang/uwsgiplugin.py index 2797e4a6..7b6a0d12 100644 --- a/plugins/erlang/uwsgiplugin.py +++ b/plugins/erlang/uwsgiplugin.py @@ -1,7 +1,15 @@ +import os NAME='erlang' -CFLAGS = [] -LDFLAGS = [] + +ERLANGPATH = os.environ.get('UWSGICONFIG_ERLANGPATH', 'erl') + +includedir = os.popen(ERLANGPATH + " -noshell -noinput -eval \"io:format('~s~n', [code:lib_dir(erl_interface, include)])\" -s erlang halt").read().rstrip() +libpath = os.popen(ERLANGPATH + " -noshell -noinput -eval \"io:format('~s~n', [code:lib_dir(erl_interface, lib)])\" -s erlang halt").read().rstrip() + +CFLAGS = [ '-I' + includedir ] +LDFLAGS = [ '-L' + libpath ] + LIBS = ['-lei'] GCC_LIST = ['erlang']