Changeset

5145:53f741a5a73a

configure, Makefile: Allow runtime to be overridden.
author Kim Alvefur <zash@zash.se>
date Fri, 28 Sep 2012 12:04:07 +0200
parents 5144:a30507061526
children 5146:db95c1f1f130
files Makefile configure
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Tue Sep 25 22:03:35 2012 +0200
+++ b/Makefile	Fri Sep 28 12:04:07 2012 +0200
@@ -52,7 +52,8 @@
 	$(MAKE) install -C util-src
 
 %.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_DATADIR=.*;$$|CFG_DATADIR='$(INSTALLEDDATA)';|; \
 		s|^CFG_PLUGINDIR=.*;$$|CFG_PLUGINDIR='$(INSTALLEDMODULES)/';|;" < $^ > $@
--- a/configure	Tue Sep 25 22:03:35 2012 +0200
+++ b/configure	Fri Sep 28 12:04:07 2012 +0200
@@ -16,6 +16,7 @@
 CC=gcc
 CXX=g++
 LD=gcc
+RUNWITH=lua
 
 CFLAGS="-fPIC -Wall"
 LDFLAGS="-shared"
@@ -171,6 +172,9 @@
    --linker=*)
       LD="$value"
       ;;
+   --runwith=*)
+      RUNWITH="$value"
+      ;;
    *)
       echo "Error: Unknown flag: $1"
       exit 1
@@ -341,6 +345,7 @@
 CC=$CC
 CXX=$CXX
 LD=$LD
+RUNWITH=$RUNWITH
 
 EOF