BIND_OPTS=$BIND_OPTS' cc optimize cflags arch' OPTIMIZE='' CFLAGS='' if test -z "$CONFIG_CC" ; then echo -n "Analyzing C Compiler..." if test -z "$CONFIG_ARCH" ; then CONFIG_ARCH=`uname -m`"-"`uname` fi if fn_find_fpath -x gcc $PATH ; then CONFIG_CC='gcc' echo "gcc" else if test -z "$CONFIG_CC" ; then CONFIG_CC='cc' echo 'cc' fi fi fi opt_optimize() { OPTIMIZE="$1" CONFIG_COPT="$1" return 0 } opt_cflags() { CONFIG_ENDIAN="" CONFIG_CFLAGS="$1" CFLAGS="$1" } opt_cc() { CONFIG_CC="$1" CONFIG_COPT="$OPTIMIZE" CONFIG_CFLAGS="$CFLAGS" return 0 } opt_arch() { CONFIG_ENDIAN="" CONFIG_ARCH="$1" if test "gcc" = $CONFIG_CC ; then CONFIG_COPT="$OPTIMIZE" if test -d /usr/local/lib/gcc-lib ; then GCC_LIB='/usr/local/lib/gcc-lib' fi if test -d /usr/lib/gcc-lib ; then GCC_LIB='/usr/lib/gcc-lib' fi if fn_find_fpath -d "$1" "$GCC_LIB"':/usr:/usr/local' ; then CONFIG_CFLAGS='-b '"$1" else echo "config: $1: unsupported gcc architecture" exit -1 fi if -d /usr/$1/include ; then CONFIG_HOST=/usr/$1 fi if -d /usr/local/$1/include ; then CONFIG_HOST=/usr/local/$1 fi fi return 0 }