configure, Makefile: Allow runtime to be overridden.

This commit is contained in:
Kim Alvefur 2012-09-28 12:04:07 +02:00
parent 5db9a6c120
commit 2b1cd1a3ae
2 changed files with 7 additions and 1 deletions

View file

@ -52,7 +52,8 @@ util/%.so:
$(MAKE) install -C util-src $(MAKE) install -C util-src
%.install: % %.install: %
sed "s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \ sed "1s/\blua\b/$(RUNWITH)/; \
s|^CFG_SOURCEDIR=.*;$$|CFG_SOURCEDIR='$(INSTALLEDSOURCE)';|; \
s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|; \ s|^CFG_CONFIGDIR=.*;$$|CFG_CONFIGDIR='$(INSTALLEDCONFIG)';|; \
s|^CFG_DATADIR=.*;$$|CFG_DATADIR='$(INSTALLEDDATA)';|; \ s|^CFG_DATADIR=.*;$$|CFG_DATADIR='$(INSTALLEDDATA)';|; \
s|^CFG_PLUGINDIR=.*;$$|CFG_PLUGINDIR='$(INSTALLEDMODULES)/';|;" < $^ > $@ s|^CFG_PLUGINDIR=.*;$$|CFG_PLUGINDIR='$(INSTALLEDMODULES)/';|;" < $^ > $@

5
configure vendored
View file

@ -16,6 +16,7 @@ OPENSSL_LIB=crypto
CC=gcc CC=gcc
CXX=g++ CXX=g++
LD=gcc LD=gcc
RUNWITH=lua
CFLAGS="-fPIC -Wall" CFLAGS="-fPIC -Wall"
LDFLAGS="-shared" LDFLAGS="-shared"
@ -171,6 +172,9 @@ do
--linker=*) --linker=*)
LD="$value" LD="$value"
;; ;;
--runwith=*)
RUNWITH="$value"
;;
*) *)
echo "Error: Unknown flag: $1" echo "Error: Unknown flag: $1"
exit 1 exit 1
@ -341,6 +345,7 @@ LDFLAGS=$LDFLAGS
CC=$CC CC=$CC
CXX=$CXX CXX=$CXX
LD=$LD LD=$LD
RUNWITH=$RUNWITH
EOF EOF