diff options
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 67 | 
1 files changed, 37 insertions, 30 deletions
| @@ -1,7 +1,7 @@  #!/usr/bin/env bash  #  # ToscoConf 0.04 -# Copyright (c) 2003-2004 Leandro Pereira <leandro@linuxmag.com.br> +# Copyright (c) 2003-2004 Leandro Pereira <leandro@hardinfo.org>  # All rights reserved.  #  # This script is in the Tosco Public License. It may be copied and/or @@ -24,7 +24,7 @@ PACKAGE=`basename ${PWD} | cut -d"-" -f1`;  VERSION=`basename ${PWD} | cut -d"-" -f2`;  if [ "$PACKAGE" == "$VERSION" ]; then -	VERSION=$(printf "SVN_%d" $(LC_ALL=C svn -R info|grep Revision|cut -d: -f2|sort -n|tail -n1)) +	VERSION=$(date +"%F.%H:%M:%S")  	RELEASE=0  else  	RELEASE=1 @@ -55,7 +55,8 @@ case $PROC in  		ARCH="ARCH_PPC" ;;  	x86_64)  		ln -sf linux/x86_64 arch/this -		ARCH="ARCH_x86_64" ;; +		ARCH="ARCH_x86_64" +		LIBDIR="/usr/lib64" ;;  	mips*)  		ln -sf linux/mips arch/this  		ARCH="ARCH_MIPS" ;; @@ -80,11 +81,15 @@ case $PROC in  	m68k)  		ln -sf linux/m68k arch/this  		ARCH="ARCH_m68k" ;; +	sh*) +		ln -sf linux/sh arch/this +		ARCH="ARCH_sh" ;; +  esac  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 "output of the following commands to leandro@hardinfo.org:"  	echo ""  	echo "  $ cat /proc/cpuinfo"  	echo "  $ uname -a" @@ -99,24 +104,6 @@ echo ""  # --------------------------------------------------------------------------- -echo -n "Checking for 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 -	fi -done - -if [ -e "$LSPCI" ]; then -	echo $LSPCI -else -	echo "lspci cannot be found" -	exit -fi - -# --------------------------------------------------------------------------- -  GTK2=-1  MIN_VERSION="2.6.0"  echo -n "Checking for GTK version >= ${MIN_VERSION}... " @@ -148,16 +135,16 @@ fi  # ---------------------------------------------------------------------------  SOUP=-1 -MIN_VERSION="2.2.7" +MIN_VERSION="2.24"  echo -n "Checking for libsoup version >= ${MIN_VERSION}... "  for i in `which pkg-config`; do -	$i --errors-to-stdout libsoup-2.2 \ +	$i --errors-to-stdout libsoup-2.4 \  		--atleast-version=$MIN_VERSION > /dev/null  	case $? in  		0) -			SOUP_FLAGS=`pkg-config libsoup-2.2 --cflags --static` -			SOUP_LIBS=`pkg-config libsoup-2.2 --libs --static` -			echo "found `pkg-config libsoup-2.2 --modversion`" +			SOUP_FLAGS=`pkg-config libsoup-2.4 --cflags --static` +			SOUP_LIBS=`pkg-config libsoup-2.4 --libs --static` +			echo "found `pkg-config libsoup-2.4 --modversion`"  			SOUP=1  			break ;;  		*) @@ -173,13 +160,29 @@ fi  # -------------------------------------------------------------------------- +echo -n "Checking for Linux Wireless Extensions (CONFIG_NET_RADIO)... " +if [ -e /proc/net/wireless ]; then +	echo "found." +	LINUX_WE=1 +else +	echo "not found." +	LINUX_WE=-1 +fi + +# -------------------------------------------------------------------------- + +if [ $LINUX_WE -eq -1 ]; then +	echo "Disabling Linux Wireless Extensions support." +fi + +# -------------------------------------------------------------------------- +  echo -e "\nWriting config.h..."  rm -f config.h  echo -e "#ifndef __CONFIG_H__\n#define __CONFIG_H__\n" > config.h  echo "#define VERSION \"$VERSION\"" >> config.h -echo "#define LSPCI \"$LSPCI -v\"" >> config.h  echo "#define $ARCH" >> config.h  echo "#define ARCH     \"$ARCH\"" >> config.h @@ -194,6 +197,10 @@ if [ "$SOUP" == "1" ]; then  	echo "#define HAS_LIBSOUP" >> config.h  fi +if [ "$LINUX_WE" == "1" ]; then +	echo "#define HAS_LINUX_WE" >> config.h +fi +  if [ "$RELEASE" == "1" ]; then  	echo "#define DEBUG(...)" >> config.h  else @@ -209,7 +216,7 @@ echo -e "\n#endif	/* __CONFIG_H__ */" >> config.h  echo "Writing Makefile..."  rm -f Makefile -echo "GTK_LIBS = ${GTK_LIBS}" > Makefile +echo "GTK_LIBS = -lpthread -lgthread-2.0 -lrt ${GTK_LIBS}" > Makefile  echo "GTK_CFLAGS = ${GTK_FLAGS}" >> Makefile  echo "SOUP_LIBS = ${SOUP_LIBS}" >> Makefile  echo "SOUP_CFLAGS = ${SOUP_FLAGS}" >> Makefile @@ -235,6 +242,6 @@ 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>. +code, please send a patch (use "diff -u") to <leandro@hardinfo.org>.  EOF  fi | 
