Line 83... |
Line 83... |
# default
|
# default
|
# 021209 - Added --disable-werror flag to gdb-6.8 configure line to fix issue
|
# 021209 - Added --disable-werror flag to gdb-6.8 configure line to fix issue
|
# with gcc-4.4.1
|
# with gcc-4.4.1
|
# 110310 - Moved or1ksim to its own directory in the chosen install directory
|
# 110310 - Moved or1ksim to its own directory in the chosen install directory
|
# 140310 - Fixed problem with mkdir command
|
# 140310 - Fixed problem with mkdir command
|
|
# 140310 - Fixed ncurses header checking
|
|
|
# TODO: OS X build things - need an "elf.h" from some Linux machine's
|
# TODO: OS X build things - need an "elf.h" from some Linux machine's
|
# /usr/local/include dir and put in Mac's /usr/local/include dir -
|
# /usr/local/include dir and put in Mac's /usr/local/include dir -
|
# this solves issue with Linux compilation
|
# this solves issue with Linux compilation
|
# TODO: OS X build things - add HOST_LOADLIBES="lintl" to make line of uClibc
|
# TODO: OS X build things - add HOST_LOADLIBES="lintl" to make line of uClibc
|
Line 140... |
Line 141... |
g++
|
g++
|
bzip2
|
bzip2
|
wget
|
wget
|
makeinfo
|
makeinfo
|
"
|
"
|
|
header_check() {
|
|
# Compile a simple program, including the header we're checking for
|
|
echo "#include <$1.h>" > header_check.c
|
|
echo "int main () { return 0; }" >> header_check.c
|
|
gcc header_check.c
|
|
}
|
|
|
check_essential_build_tools()
|
check_essential_build_tools()
|
{
|
{
|
|
|
echo "#########################Checking for required build tools######################"
|
echo "#########################Checking for required build tools######################"
|
echo
|
echo
|
Line 161... |
Line 169... |
echo
|
echo
|
exit 2
|
exit 2
|
fi
|
fi
|
done
|
done
|
|
|
# Now check if libncurses-dev has been installed - check for the header
|
|
# Get host system's GCC prefix dir (usually /usr, but just to be sure)
|
|
# Get the verbose output of GCC, redirect STDERR to STDOUT, pipe to grep replacing spaces with newlines
|
|
# grep for the prefix dir line, cut away after the equals sign and we should have the right dir
|
|
echo "Checking for libncurses-dev (headers)"
|
echo "Checking for libncurses-dev (headers)"
|
GCC_V_LIST=`gcc -v 2>&1 | sed -e s/\ /'\\\n'/g`
|
header_check "ncurses"
|
HOST_GCC_PREFIX=`echo $GCC_V_LIST | grep prefix | cut -d = -f 2 | head -1`
|
# Now check the return value of that function
|
NCURSES_HEADER_COUNT=`find $HOST_GCC_PREFIX/include -name "ncurses.h" | grep ncurses -c`
|
if [ $? -ne 0 ]; then
|
if [ $NCURSES_HEADER_COUNT -eq 0 ]; then
|
|
echo
|
echo
|
echo "\tlibncurses-dev not found"
|
echo "\tlibncurses-dev not found"
|
echo ; echo "Please install libncurses-dev and re-run this script"; echo
|
echo ; echo "Please install libncurses-dev and re-run this script"; echo
|
|
rm -f header_check.c a.out
|
exit 2
|
exit 2
|
fi
|
fi
|
|
rm -f header_check.c a.out
|
|
|
# Todo: somehow inform the user that if we're checking for makeinfo they need to install texinfo package
|
# Todo: somehow inform the user that if we're checking for makeinfo they need to install texinfo package
|
echo
|
echo
|
}
|
}
|
|
|
## SCRIPT VERSION ##
|
## SCRIPT VERSION ##
|