Ignore:
Timestamp:
May 10, 2006 7:24:40 PM (18 years ago)
Author:
bennylp
Message:

Merge-in RTEMS port patch by Phil Torre <ptorre@…>, alpha release.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/configure

    r431 r433  
    22 
    33# 
    4 # Detect machine 
     4# Detect machine, unless the choice has been made already. 
    55# 
    6 MACHINE=`uname -p` 
    7 if echo $MACHINE | grep unknown > /dev/null; then 
    8     MACHINE=`uname -m` 
    9 fi; 
     6if [ "$MACHINE" = "" ]; then 
     7        MACHINE=`uname -m` 
     8fi       
    109 
    11 if echo $MACHINE | grep sparc > /dev/null; then 
     10if echo $MACHINE | grep sun4u > /dev/null; then 
    1211    MACHINE_NAME=sparc 
    1312elif echo $MACHINE | grep i.86 > /dev/null; then 
     
    1817    MACHINE_NAME=powerpc 
    1918else 
    20     echo "Unable to detect processor type ('uname -p' == '$MACHINE')" 
     19    echo "Unable to detect processor type ('uname -m' == '$MACHINE')" 
    2120    exit 1 
    2221fi 
    2322 
    2423# 
    25 # Detect OS and host 
     24# Detect OS and host, unless the choice has been made already 
    2625# 
    27 SYSTEM=`uname -s` 
     26if [ "$SYSTEM" = "" ]; then 
     27    SYSTEM=`uname -s` 
     28fi       
     29  
    2830 
    2931if echo $SYSTEM | grep -i sunos > /dev/null; then 
     
    5456    OS_NAME=darwinos 
    5557    HOST_NAME=unix 
     58elif echo $SYSTEM | grep -i rtems > /dev/null; then 
     59    OS_NAME=rtems 
     60    HOST_NAME=unix 
    5661else 
    5762    echo "Unable to detect system type ('uname -s' == '$SYSTEM')" 
     
    6065 
    6166# 
    62 # Detect gcc 
     67# Detect gcc, unless it has been chosen already 
    6368# 
    64 if gcc --version 2>&1 > /dev/null; then 
    65     CC_NAME=gcc 
    66 else 
    67     echo "Unable to find gcc" 
    68     exit 1 
    69 fi 
     69if [ "$CC_NAME" = "" ]; then 
     70        if gcc --version 2>&1 > /dev/null; then 
     71                CC_NAME=gcc 
     72        else 
     73                echo "Unable to find gcc" 
     74                exit 1 
     75        fi 
     76fi       
     77  
    7078 
    7179# 
    72 # TARGET 
     80# Specify TARGET_NAME, if not already choosen. 
    7381# 
    74 TARGET_NAME=$MACHINE_NAME-$OS_NAME-$CC_NAME 
     82if [ "$TARGET_NAME" = "" ]; then 
     83   TARGET_NAME=$MACHINE_NAME-$OS_NAME-$CC_NAME 
     84fi 
    7585 
    7686 
     
    8696echo " CC_NAME      = $CC_NAME" 
    8797echo " TARGET_NAME  = $TARGET_NAME" 
     98echo " CROSS_COMPILE= $CROSS_COMPILE" 
    8899echo " LINUX_POLL   = $LINUX_POLL" 
    89100 
     
    94105echo "export CC_NAME := $CC_NAME" >> build.mak 
    95106echo "export TARGET_NAME := $TARGET_NAME" >> build.mak 
     107echo "export CROSS_COMPILE := $CROSS_COMPILE" >> build.mak 
    96108echo "export LINUX_POLL := $LINUX_POLL" >> build.mak 
    97109 
Note: See TracChangeset for help on using the changeset viewer.