From 707b623ea8b21d3a816565b911fdd1aac4315a54 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 10 Nov 2009 16:25:59 +0100 Subject: [PATCH] Allow overriding system detection in configure --- configure | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/configure b/configure index a8dd51a..ba937d2 100755 --- a/configure +++ b/configure @@ -194,6 +194,11 @@ Fine tuning of the installation directories: --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] +Overriding system detection when cross-compiling: + --host-system=OS Specify system name (uname -s) + --host-release=REL Specify system release (uname -r) + --host-machine=CPU Specify machine (uname -m) + Some influential environment variables: CC C compiler command CFLAGS C compiler flags @@ -219,8 +224,6 @@ OPERATINGSYSTEM=`uname -s` VERSION=`uname -r` MACHINE=`uname -m` -SYSTEM=${OPERATINGSYSTEM}-${MACHINE} - EXTRA_LIBS="" EXTRA_CLI_LIBS="" EXTRA_OBJECTS="" @@ -280,6 +283,15 @@ do --enable-linuxcaps) feat_linuxcaps=1 ;; + --host-system=* ) + OPERATINGSYSTEM=`echo $option | sed -e 's/^.*=//;'` + ;; + --host-release=* ) + VERSION=`echo $option | sed -e 's/^.*=//;'` + ;; + --host-machine=* ) + MACHINE=`echo $option | sed -e 's/^.*=//;'` + ;; --help | -h ) usage exit 0 @@ -289,6 +301,8 @@ do esac done +SYSTEM=${OPERATINGSYSTEM}-${MACHINE} + case $SYSTEM in SunOS-sun4* ) case $VERSION in