diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -5,14 +5,16 @@ set -e # Configured variables ##################################################### # Described in following format: # name:initial value:type:if exported to makefile:if exported to C header -# Where type can be just a string (in C in "") or plain. None implies plain. +# Where type can be just a string (in C and shell in "") or plain. None implies +# plain. CNFS="CBUILD:::F:F CHOST:::F:F DEBUG:no::T:F CPREFIX:::T:F +CHOST::string:T:F CCX:g++::T:F -CFLAGS:::T:F -LFLAGS:::T:F" +CFLAGS::string:T:F +LFLAGS::string:T:F" ############################################################################ # TODO add options to fine tune installation directories @@ -83,6 +85,10 @@ while [ "$#" -gt 0 ]; do -r|--release) DEBUG=no ;; + --host=*) + CHOST=${1#--host=} + shift + ;; --op-makefile) OP=m ;; @@ -107,8 +113,12 @@ configure() { echo "# Please do not edit this file directly." >> "$CONFIG_FILE" echo "$CNFS" | while read L; do NAME=`echo "$L" | grep -o -E '^[^:]*'` - eval "VALUE=\$$NAME" - echo "$NAME=$VALUE" >> "$CONFIG_FILE" + eval "VALUE=\"\$$NAME\"" + if [ "`echo $L | awk -F ':' '{ print $3 }'`" = "string" ]; then + echo "$NAME=\"$VALUE\"" >> "$CONFIG_FILE" + else + echo "$NAME=$VALUE" >> "$CONFIG_FILE" + fi done echo "Configuration written to \"$CONFIG_FILE\"" } |