diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 72 |
1 files changed, 53 insertions, 19 deletions
@@ -23,18 +23,22 @@ PACKAGE=`basename ${PWD} | cut -d"-" -f1`; VERSION=`basename ${PWD} | cut -d"-" -f2`; -[ "$PACKAGE" == "$VERSION" ] && VERSION="SVN_$(date)" +if [ "$PACKAGE" == "$VERSION" ]; then + VERSION=$(printf "SVN_%d" $(svn -R info|grep Revision|cut -d: -f2|sort -n|tail -n1)) + RELEASE=0 +else + RELEASE=1 +fi echo "ToscoConf (version 0.04) for $PACKAGE version $VERSION" # --------------------------------------------------------------------------- -echo -n "Running: " +echo "Determining system architecture." OS=`uname` -echo -n $OS case $OS in Linux) - echo -n " (OK) " ;; + ;; *) echo " (not supported, yet!)" exit ;; @@ -45,13 +49,13 @@ case $PROC in i?86) ln -sf linux/x86 arch/this ARCH="ARCH_i386" ;; - ppc) + ppc*) ln -sf linux/ppc arch/this ARCH="ARCH_PPC" ;; x86_64) ln -sf linux/x86_64 arch/this ARCH="ARCH_x86_64" ;; - mips) + mips*) ln -sf linux/mips arch/this ARCH="ARCH_MIPS" ;; parisc*) @@ -60,6 +64,9 @@ case $PROC in sparc*) ln -sf linux/sparc arch/this ARCH="ARCH_SPARC" ;; + armv4l) + ln -sf linux/armv4l arch/this + ARCH="ARCH_ARMV4L" ;; *) # uname -m on m68k doesn't return anything useful :/ grep "680?0" /proc/cpuinfo > /dev/null @@ -74,16 +81,29 @@ case $PROC in ;; esac -echo "$PROC ($ARCH)" +if [ "x$ARCH" == "x" ]; then + echo "Your architecture is not supported yet. Please send the" + echo "output of the following commands to leandro@linuxmag.com.br:" + echo "" + echo " $ cat /proc/cpuinfo" + echo " $ uname -a" + echo " $ uname -m" + exit 1 +fi + +# --------------------------------------------------------------------------- + +echo "Compiling $PACKAGE for $OS $PROC ($ARCH)." +echo "" # --------------------------------------------------------------------------- echo -n "Checking for lspci... " -LSPCIPATH="/sbin/lspci /usr/sbin/lspci /bin/lspci /usr/bin/lspci `which lspci`" +LSPCIPATH="/sbin/lspci /usr/sbin/lspci /bin/lspci /usr/bin/lspci `which lspci 2>/dev/null`" for i in $LSPCIPATH; do if [ -x "$i" ]; then - LSPCI=$i - break; + LSPCI=$i + break fi done @@ -98,7 +118,7 @@ fi GTK2=-1 MIN_VERSION="2.6.0" -echo -n "Checking for GTK ${MIN_VERSION}... " +echo -n "Checking for GTK version >= ${MIN_VERSION}... " for i in `which pkg-config`; do pkg-config --errors-to-stdout gtk+-2.0 \ --atleast-version=$MIN_VERSION > /dev/null @@ -106,7 +126,7 @@ for i in `which pkg-config`; do 0) GTK_FLAGS=`pkg-config gtk+-2.0 --cflags` GTK_LIBS=`pkg-config gtk+-2.0 --libs` - echo "OK (pkgconfig)" + echo "found `pkg-config gtk+-2.0 --modversion`" GTK2=1 ;; *) echo "not found." ;; @@ -131,10 +151,7 @@ echo -e "#ifndef __CONFIG_H__\n#define __CONFIG_H__\n" > config.h echo "#define VERSION \"$VERSION\"" >> config.h -if [ "$LSPCI" ]; then - echo "#define LSPCI \"$LSPCI -v\"" >> config.h -fi - +echo "#define LSPCI \"$LSPCI -v\"" >> config.h echo "#define $ARCH" >> config.h echo "#define PLATFORM \"`uname`\"" >> config.h @@ -142,7 +159,9 @@ echo "#define KERNEL \"`uname -r`\"" >> config.h echo "#define HOSTNAME \"`hostname`\"" >> config.h echo "#define PREFIX \"/usr/share/hardinfo/\"" >> config.h +echo "#define LIBPREFIX \"/usr/lib/hardinfo/\"" >> config.h echo "#define DEBUG 1" >> config.h +echo "#define ENABLE_BINRELOC" >> config.h echo -e "\n#endif /* __CONFIG_H__ */" >> config.h @@ -159,6 +178,21 @@ echo "ARCHOPTS = " >> Makefile cat Makefile.in >> Makefile echo -e "\nDone. Type \"make\" to compile the program.\n" -echo "If you get errors, probably you don't have the right libraries," -echo "includes or utilities. However, if you're sure this is a bug in my" -echo -e "code, please send a patch (use \"diff -u\") to <leandro@linuxmag.com.br>.\n" + + +if [ "$RELEASE" == 0 ]; then + cat << EOF +********************************************************* +* This is work in progress! Please report bugs at: * +* http://developer.berlios.de/bugs/?group_id=5897 * +* Or send patches to: * +* http://developer.berlios.de/patch/?group_id=5897 * +********************************************************* +EOF +else + cat << EOF +If you get errors, probably you don't have the right libraries, +includes or utilities. However, if you're sure this is a bug in my +code, please send a patch (use \"diff -u\") to <leandro@linuxmag.com.br>. +EOF +fi |