diff -uNr vic-2.8.orig/color-dither.cc vic-2.8/color-dither.cc --- vic-2.8.orig/color-dither.cc Tue Nov 14 02:46:09 1995 +++ vic-2.8/color-dither.cc Tue Aug 24 04:37:57 1999 @@ -177,7 +177,7 @@ protected: DitherColorModel& cm_; virtual void update(); - virtual void disable() { method_ = PseudoWindowRenderer::dither_null; } + virtual void disable() { method_ = &PseudoWindowRenderer::dither_null; } DitherMethod method_; void dither_422(const u_char* frm, u_int off, u_int x, u_int width, u_int height) const; diff -uNr vic-2.8.orig/color-ed.cc vic-2.8/color-ed.cc --- vic-2.8.orig/color-ed.cc Tue Nov 14 02:46:10 1995 +++ vic-2.8/color-ed.cc Tue Aug 24 04:38:30 1999 @@ -180,7 +180,7 @@ protected: EDColorModel& cm_; virtual void update(); - virtual void disable() { method_ = PseudoWindowRenderer::dither_null; } + virtual void disable() { method_ = &PseudoWindowRenderer::dither_null; } EDMethod method_; void dither_422(const u_char* frm, u_int off, u_int x, u_int width, u_int height) const; diff -uNr vic-2.8.orig/color-gray.cc vic-2.8/color-gray.cc --- vic-2.8.orig/color-gray.cc Tue Nov 14 02:46:10 1995 +++ vic-2.8/color-gray.cc Tue Aug 24 04:40:05 1999 @@ -82,7 +82,7 @@ } protected: virtual void update(); - virtual void disable() { method_ = PseudoWindowRenderer::dither_null; } + virtual void disable() { method_ = &PseudoWindowRenderer::dither_null; } GrayMethod method_; }; diff -uNr vic-2.8.orig/color-hi.cc vic-2.8/color-hi.cc --- vic-2.8.orig/color-hi.cc Thu May 16 08:42:44 1996 +++ vic-2.8/color-hi.cc Tue Aug 24 04:39:43 1999 @@ -164,7 +164,7 @@ protected: HiColorModel& cm_; virtual void update(); - virtual void disable() { method_ = HiMethod(WindowRenderer::dither_null); } + virtual void disable() { method_ = HiMethod(&WindowRenderer::dither_null); } HiMethod method_; void map_422(const u_char* frm, u_int off, u_int x, u_int width, u_int height) const; diff -uNr vic-2.8.orig/color-mono.cc vic-2.8/color-mono.cc --- vic-2.8.orig/color-mono.cc Mon Nov 13 23:14:31 1995 +++ vic-2.8/color-mono.cc Tue Aug 24 04:41:26 1999 @@ -200,7 +200,7 @@ ~MonoColorModel(); virtual int alloc_grays(); virtual int command(int argc, const char*const* argv); - inline white(void) { return (white_); } + inline int white(void) { return (white_); } private: int white_; }; @@ -250,7 +250,7 @@ protected: MonoColorModel& cm_; virtual void update(); - virtual void disable() { method_ = WindowDitherer::dither_null; } + virtual void disable() { method_ = &WindowDitherer::dither_null; } MonoMethod method_; void dither(const u_char* frm, u_int off, u_int x, u_int width, u_int height) const; diff -uNr vic-2.8.orig/color-quant.cc vic-2.8/color-quant.cc --- vic-2.8.orig/color-quant.cc Fri Feb 16 00:21:16 1996 +++ vic-2.8/color-quant.cc Tue Aug 24 04:38:53 1999 @@ -92,7 +92,7 @@ protected: QuantColorModel& cm_; virtual void update(); - virtual void disable() { method_ = PseudoWindowRenderer::dither_null; } + virtual void disable() { method_ = &PseudoWindowRenderer::dither_null; } QuantMethod method_; void map_422(const u_char* frm, u_int off, u_int x, u_int width, u_int height) const; diff -uNr vic-2.8.orig/color-true.cc vic-2.8/color-true.cc --- vic-2.8.orig/color-true.cc Mon Mar 4 08:32:13 1996 +++ vic-2.8/color-true.cc Tue Aug 24 04:37:02 1999 @@ -180,7 +180,7 @@ protected: TrueColorModel& cm_; virtual void update(); - virtual void disable() { method_ = TrueMethod(WindowRenderer::dither_null); } + virtual void disable() { method_ = TrueMethod(&WindowRenderer::dither_null); } TrueMethod method_; void map_422(const u_char* frm, u_int off, u_int x, u_int width, u_int height) const; diff -uNr vic-2.8.orig/config.h vic-2.8/config.h --- vic-2.8.orig/config.h Thu May 16 08:27:06 1996 +++ vic-2.8/config.h Tue Aug 24 03:00:30 1999 @@ -81,9 +81,8 @@ #endif #include #include -int strcasecmp(const char *, const char *); clock_t clock(void); -#if !defined(sco) && !defined(sgi) && !defined(__bsdi__) && !defined(__FreeBSD__) +#if !defined(sco) && !defined(sgi) && !defined(__bsdi__) && !defined(__FreeBSD__) && !defined(__linux__) int gethostid(void); #endif time_t time(time_t *); diff -uNr vic-2.8.orig/config.status vic-2.8/config.status --- vic-2.8.orig/config.status Wed Dec 31 21:00:00 1969 +++ vic-2.8/config.status Tue Aug 24 05:32:00 1999 @@ -0,0 +1,195 @@ +#! /bin/sh +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# This directory was configured as follows, +# on host mordor: +# +# ./configure --x-libraries=/usr/X11R6/lib +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]" +for ac_option +do + case "$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running ${CONFIG_SHELL-/bin/sh} ./configure --x-libraries=/usr/X11R6/lib --no-create --no-recursion" + exec ${CONFIG_SHELL-/bin/sh} ./configure --x-libraries=/usr/X11R6/lib --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "./config.status generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "$ac_cs_usage"; exit 0 ;; + *) echo "$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=. + +trap 'rm -fr Makefile conftest*; exit 1' 1 2 15 + +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g; + s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF +/^[ ]*VPATH[ ]*=[^:]*$/d + +s%@SHELL@%/bin/sh%g +s%@CFLAGS@%-O2%g +s%@CPPFLAGS@%%g +s%@CXXFLAGS@%-g -O2%g +s%@FFLAGS@%%g +s%@DEFS@% -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_LIBDL=1 %g +s%@LDFLAGS@%%g +s%@LIBS@%-ldl %g +s%@exec_prefix@%${prefix}%g +s%@prefix@%/usr/local%g +s%@program_transform_name@%s,x,x,%g +s%@bindir@%${exec_prefix}/bin%g +s%@sbindir@%${exec_prefix}/sbin%g +s%@libexecdir@%${exec_prefix}/libexec%g +s%@datadir@%${prefix}/share%g +s%@sysconfdir@%${prefix}/etc%g +s%@sharedstatedir@%${prefix}/com%g +s%@localstatedir@%${prefix}/var%g +s%@libdir@%${exec_prefix}/lib%g +s%@includedir@%${prefix}/include%g +s%@oldincludedir@%/usr/include%g +s%@infodir@%${prefix}/info%g +s%@mandir@%${prefix}/man%g +s%@host@%i686-unknown-linux-gnu%g +s%@host_alias@%i686-unknown-linux%g +s%@host_cpu@%i686%g +s%@host_vendor@%unknown%g +s%@host_os@%linux-gnu%g +s%@target@%i686-unknown-linux-gnu%g +s%@target_alias@%i686-unknown-linux%g +s%@target_cpu@%i686%g +s%@target_vendor@%unknown%g +s%@target_os@%linux-gnu%g +s%@build@%i686-unknown-linux-gnu%g +s%@build_alias@%i686-unknown-linux%g +s%@build_cpu@%i686%g +s%@build_vendor@%unknown%g +s%@build_os@%linux-gnu%g +s%@CC@%gcc%g +s%@CXX@%c++%g +s%@CPP@%gcc -E%g +s%@V_INCLUDE_X11@%%g +s%@V_LIB_X11@%-L/usr/X11R6/lib -lXext -lX11%g +s%@V_INCLUDE_TCL@%%g +s%@V_LIB_TCL@%-ltcl8.0%g +s%@V_LIBRARY_TCL@%/usr/lib/tcl8.0%g +s%@V_TKDOSNAMES@%$(LIBRARY_TK)/optMenu.tcl $(LIBRARY_TK)/scrlbar.tcl%g +s%@V_INCLUDE_TK@%%g +s%@V_LIB_TK@%-ltk8.0%g +s%@V_LIBRARY_TK@%/usr/lib/tk8.0%g +s%@V_INCLUDE_GRABBER@%%g +s%@V_LIB_GRABBER@%%g +s%@V_OBJ_GRABBER@% grabber-video4linux.o%g +s%@V_LIB_XIL@%%g +s%@V_OBJ_XIL@%%g +s%@V_STATIC@%%g +s%@V_TAR_TARGET@%linux-gnu%g +s%@V_ALL@%vic%g +s%@V_CCOPT@%-O2%g +s%@V_TAR_EXTRA@%%g +s%@V_LIB@% -lnsl -ldl%g +s%@V_DEFINE@% -DUSE_SHM%g +s%@V_SIGRET@%void%g +s%@V_SHELL@%%g +s%@V_TARCMD@%tar cfh%g +s%@V_INCLUDE@%%g +s%@V_OBJ@%%g +s%@V_BROKEN_OBJ@%%g +s%@V_OBJ_CRYPT@%%g + +CEOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi + +CONFIG_FILES=${CONFIG_FILES-"Makefile"} +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + + + +exit 0 diff -uNr vic-2.8.orig/config.sub vic-2.8/config.sub --- vic-2.8.orig/config.sub Sun May 7 18:26:33 1995 +++ vic-2.8/config.sub Tue Aug 24 03:00:30 1999 @@ -1,9 +1,9 @@ #! /bin/sh # Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. +# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. +# can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -17,7 +17,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -40,6 +41,8 @@ # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. if [ x$1 = x ] @@ -61,11 +64,21 @@ ;; esac -# Separate what the user gave into CPU-COMPANY and OS (if any). -basic_machine=`echo $1 | sed 's/-[^-]*$//'` -if [ $basic_machine != $1 ] -then os=`echo $1 | sed 's/.*-/-/'` -else os=; fi +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + linux-gnu*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also @@ -80,38 +93,43 @@ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp ) + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple) os= basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; + -sco5) + os=sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco4) os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos @@ -122,34 +140,49 @@ -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; + -psos*) + os=-psos + ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i[345]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \ - | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \ - | alpha | we32k | ns16k | clipper | sparclite | i370 | sh \ - | powerpc | sparc64 | 1750a | dsp16xx | mips64 | mipsel \ - | pdp11 | mips64el | mips64orion | mips64orionel \ - | sparc) + tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ + | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \ + | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ + | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ + | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ + | mipstx39 | mipstx39el | armv[34][lb] \ + | sparc | sparclet | sparclite | sparc64 | v850) basic_machine=$basic_machine-unknown ;; + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[34567]86) + basic_machine=$basic_machine-pc + ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[345]86-* | i860-* | m68k-* | m68000-* | m88k-* \ - | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ + vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ - | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ - | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ - | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ - | pdp11-* | sh-* | powerpc-* | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-*) + | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ + | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \ + | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ + | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ + | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | mips64-* | mipsel-* | armv[34][lb]-*\ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mipstx39-* | mipstx39el-* \ + | f301-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -176,9 +209,9 @@ amiga | amiga-*) basic_machine=m68k-cbm ;; - amigados) + amigaos | amigados) basic_machine=m68k-cbm - os=-amigados + os=-amigaos ;; amigaunix | amix) basic_machine=m68k-cbm @@ -188,6 +221,10 @@ basic_machine=m68k-apollo os=-sysv ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; balance) basic_machine=ns32k-sequent os=-dynix @@ -220,6 +257,10 @@ basic_machine=cray2-cray os=-unicos ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; crds | unos) basic_machine=m68k-crds ;; @@ -301,25 +342,28 @@ hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; + hppa-next) + os=-nextstep3 + ;; i370-ibm* | ibm*) basic_machine=i370-ibm os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[345]86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i[34567]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; - i[345]86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i[34567]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; - i[345]86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i[34567]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; - i[345]86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'` + i[34567]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; iris | iris4d) @@ -350,6 +394,14 @@ miniframe) basic_machine=m68000-convergent ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; @@ -417,14 +469,39 @@ pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium-*) - # We will change tis to say i586 once there has been - # time for various packages to start to recognize that. - basic_machine=i486-`echo $basic_machine | sed 's/^[^-]*-//'` + pentium | p5 | k5 | nexen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | k6 | 6x86) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | nexen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | k6-* | 6x86-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; + power) basic_machine=rs6000-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ps2) basic_machine=i386-ibm ;; @@ -492,6 +569,12 @@ basic_machine=i386-sequent os=-dynix ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; tower | tower-32) basic_machine=m68k-ncr ;; @@ -511,6 +594,9 @@ basic_machine=vax-dec os=-vms ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -519,6 +605,10 @@ basic_machine=m68k-wrs os=-vxworks ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; xmp) basic_machine=xmp-cray os=-unicos @@ -534,7 +624,11 @@ # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. mips) - basic_machine=mips-mips + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi ;; romp) basic_machine=romp-ibm @@ -586,6 +680,8 @@ if [ x"$os" != x"" ] then case $os in + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` @@ -593,25 +689,36 @@ -solaris) os=-solaris2 ;; - -unixware* | svr4*) + -svr4*) os=-sysv4 ;; + -unixware*) + os=-sysv4.2uw + ;; -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux|'` + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. - # Each alternative must end in a *, to match a version number. + # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[345]* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \ - | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \ - | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta | -udi | -eabi) + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` @@ -637,6 +744,9 @@ -ctix* | -uts*) os=-sysv ;; + -ns2 ) + os=-nextstep2 + ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` @@ -690,6 +800,9 @@ *-acorn) os=-riscix1.2 ;; + arm*-semi) + os=-aout + ;; pdp11-*) os=-none ;; @@ -714,6 +827,9 @@ sparc-* | *-sun) os=-sunos4.1.1 ;; + *-be) + os=-beos + ;; *-ibm) os=-aix ;; @@ -727,7 +843,7 @@ os=-sysv ;; *-cbm) - os=-amigados + os=-amigaos ;; *-dg) os=-dgux @@ -741,6 +857,9 @@ m88k-omron*) os=-luna ;; + *-next ) + os=-nextstep + ;; *-sequent) os=-ptx ;; @@ -774,6 +893,9 @@ *-masscomp) os=-rtu ;; + f301-fujitsu) + os=-uxpv + ;; *) os=-none ;; @@ -792,9 +914,6 @@ -sunos*) vendor=sun ;; - -lynxos*) - vendor=lynx - ;; -aix*) vendor=ibm ;; @@ -822,8 +941,11 @@ -ptx*) vendor=sequent ;; - -vxworks*) + -vxsim* | -vxworks*) vendor=wrs + ;; + -aux*) + vendor=apple ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` diff -uNr vic-2.8.orig/configure vic-2.8/configure --- vic-2.8.orig/configure Sun Jun 23 20:59:45 1996 +++ vic-2.8/configure Tue Aug 24 03:16:50 1999 @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.10 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -61,6 +61,9 @@ # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 ac_prev= for ac_option @@ -342,7 +345,7 @@ verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.10" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -444,11 +447,14 @@ done # NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h @@ -509,8 +515,11 @@ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross +ac_exeext= +ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -572,31 +581,33 @@ # Make sure we can run config.sub. -if $ac_config_sub sun4 >/dev/null 2>&1; then : +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:590: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) - if host_alias=`$ac_config_guess`; then : + if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac -host=`$ac_config_sub $host_alias` -host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 +echo "configure:611: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -607,13 +618,14 @@ esac ;; esac -target=`$ac_config_sub $target_alias` -target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` +target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 +echo "configure:629: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -624,10 +636,10 @@ esac ;; esac -build=`$ac_config_sub $build_alias` -build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'` -build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'` -build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'` +build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` +build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$build" 1>&6 test "$host_alias" != "$target_alias" && @@ -639,14 +651,16 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:655: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -667,15 +681,17 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:685: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then @@ -710,10 +726,92 @@ echo "$ac_t""no" 1>&6 fi + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:736: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 779 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:810: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:815: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -722,7 +820,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -730,48 +828,63 @@ fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + if test $ac_cv_prog_gcc = yes; then GCC=yes - if test "${CFLAGS+set}" != set; then - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:843: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then - ac_cv_prog_gcc_g=yes + ac_cv_prog_cc_g=yes else - ac_cv_prog_gcc_g=no + ac_cv_prog_cc_g=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 - if test $ac_cv_prog_gcc_g = yes; then - CFLAGS="-g -O" - else - CFLAGS="-O" - fi +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi -for ac_prog in $CCC c++ g++ gcc CC cxx +for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:879: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CXX="$ac_prog" @@ -793,7 +906,55 @@ test -n "$CXX" || CXX="gcc" +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:911: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 + +ac_ext=C +# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +cat > conftest.$ac_ext << EOF + +#line 922 "configure" +#include "confdefs.h" + +int main(){return(0);} +EOF +if { (eval echo configure:927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cxx_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cxx_cross=no + else + ac_cv_prog_cxx_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cxx_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 +if test $ac_cv_prog_cxx_works = no; then + { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:953: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 +cross_compiling=$ac_cv_prog_cxx_cross + echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 +echo "configure:958: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -802,7 +963,7 @@ yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -810,36 +971,50 @@ fi echo "$ac_t""$ac_cv_prog_gxx" 1>&6 + if test $ac_cv_prog_gxx = yes; then GXX=yes - if test "${CXXFLAGS+set}" != set; then - echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gxx_g'+set}'`\" = set"; then +else + GXX= +fi + +ac_test_CXXFLAGS="${CXXFLAGS+set}" +ac_save_CXXFLAGS="$CXXFLAGS" +CXXFLAGS= +echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 +echo "configure:986: checking whether ${CXX-g++} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.cc if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then - ac_cv_prog_gxx_g=yes + ac_cv_prog_cxx_g=yes else - ac_cv_prog_gxx_g=no + ac_cv_prog_cxx_g=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_prog_gxx_g" 1>&6 - if test $ac_cv_prog_gxx_g = yes; then - CXXFLAGS="-g -O" - else - CXXFLAGS="-O" - fi +echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS="$ac_save_CXXFLAGS" +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" fi else - GXX= - test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:1018: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -854,39 +1029,62 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* +fi +rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" @@ -895,38 +1093,13 @@ fi echo "$ac_t""$CPP" 1>&6 -# If we cannot run a trivial program, we must be cross compiling. -echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_cross=yes -else -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_c_cross=no -else - ac_cv_c_cross=yes -fi -fi -rm -fr conftest* -fi - -echo "$ac_t""$ac_cv_c_cross" 1>&6 -cross_compiling=$ac_cv_c_cross - echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 +echo "configure:1098: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -934,13 +1107,15 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi @@ -949,7 +1124,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -967,7 +1142,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -987,8 +1162,8 @@ if test "$cross_compiling" = yes; then : else -cat > conftest.$ac_ext < conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -999,15 +1174,19 @@ exit (0); } EOF -{ (eval echo configure:1003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then +if { (eval echo configure:1178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then : else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* ac_cv_header_stdc=no fi -fi rm -fr conftest* fi + +fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 @@ -1020,24 +1199,27 @@ for ac_hdr in string.h do -ac_safe=`echo "$ac_hdr" | tr './\055' '___'` +ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 +echo "configure:1205: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi @@ -1045,7 +1227,7 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` + ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 -ac_lib_var=`echo Xbsd'_'main | tr './+\055' '__p_'` +echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 +echo "configure:1253: checking for main in -lXbsd" >&5 +ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lXbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -1100,30 +1284,32 @@ echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking for -lsocket""... $ac_c" 1>&6 -ac_lib_var=`echo socket'_'poll | tr './+\055' '__p_'` +echo $ac_n "checking for poll in -lsocket""... $ac_c" 1>&6 +echo "configure:1289: checking for poll in -lsocket" >&5 +ac_lib_var=`echo socket'_'poll | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -1138,30 +1324,32 @@ echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking for -lnsl""... $ac_c" 1>&6 -ac_lib_var=`echo nsl'_'gethostbyname | tr './+\055' '__p_'` +echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 +echo "configure:1329: checking for gethostbyname in -lnsl" >&5 +ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -1176,30 +1364,32 @@ echo "$ac_t""no" 1>&6 fi -echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6 -ac_lib_var=`echo dnet_stub'_'getnodebyname | tr './+\055' '__p_'` +echo $ac_n "checking for getnodebyname in -ldnet_stub""... $ac_c" 1>&6 +echo "configure:1369: checking for getnodebyname in -ldnet_stub" >&5 +ac_lib_var=`echo dnet_stub'_'getnodebyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -1304,18 +1494,20 @@ echo "checking for X11 header files" if test "$x_includes" = NONE ; then cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* x_includes="" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* x_includes=NONE fi @@ -1340,30 +1532,32 @@ echo "checking for X11 library archive" if test "$x_libraries" = NONE ; then - echo $ac_n "checking for -lX11""... $ac_c" 1>&6 -ac_lib_var=`echo X11'_'XOpenDisplay | tr './+\055' '__p_'` + echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 +echo "configure:1537: checking for XOpenDisplay in -lX11" >&5 +ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -1397,30 +1591,32 @@ if test -n "$V_SHM" ; then if test -z "$x_libraries" ; then - echo $ac_n "checking for -lXext""... $ac_c" 1>&6 -ac_lib_var=`echo Xext'_'XShmAttach | tr './+\055' '__p_'` + echo $ac_n "checking for XShmAttach in -lXext""... $ac_c" 1>&6 +echo "configure:1596: checking for XShmAttach in -lXext" >&5 +ac_lib_var=`echo Xext'_'XShmAttach | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lXext -lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -1437,8 +1633,8 @@ fi else - echo "checking for libXext.a" - if test -f $x_libraries/libXext.a ; then + echo "checking for libXext.so" + if test -f $x_libraries/libXext.so ; then V_Xext="-lXext" else echo "warning: compiling without -lXext" @@ -1478,8 +1674,8 @@ echo "can't find tcl.h in $d/include" exit 1 fi - places="$d/lib/libtcl7.5.so \ - $d/lib/libtcl7.5.a \ + places="$d/lib/libtcl8.0.so \ + $d/lib/libtcl8.0.a \ $d/lib/libtcl.so \ $d/lib/libtcl.a" V_LIB_TCL=FAIL @@ -1493,7 +1689,7 @@ echo "can't find libtcl.a in $d/lib" exit 1 fi - places="$d/lib/tcl7.5 \ + places="$d/lib/tcl8.0 \ $d/lib/tcl" V_LIBRARY_TCL=FAIL for dir in $places; do @@ -1508,27 +1704,29 @@ fi else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* V_INCLUDE_TCL="" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* V_INCLUDE_TCL=FAIL fi rm -f conftest* if test "$V_INCLUDE_TCL" = FAIL; then echo "checking for tcl.h" - places="$PWD/../tcl7.5 \ - /usr/src/local/tcl7.5 \ - /import/tcl/include/tcl7.5 \ + places="$PWD/../tcl8.0 \ + /usr/src/local/tcl8.0 \ + /import/tcl/include/tcl8.0 \ $prefix/include \ $x_includes/tk \ $x_includes \ @@ -1546,26 +1744,28 @@ exit 1 fi fi - echo $ac_n "checking for -ltcl7.5""... $ac_c" 1>&6 -ac_lib_var=`echo tcl7.5'_'main | tr './+\055' '__p_'` + echo $ac_n "checking for main in -ltcl8.0""... $ac_c" 1>&6 +echo "configure:1749: checking for main in -ltcl8.0" >&5 +ac_lib_var=`echo tcl8.0'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ltcl7.5 $LIBS" +LIBS="-ltcl8.0 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -1575,7 +1775,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - V_LIB_TCL="-ltcl7.5" + V_LIB_TCL="-ltcl8.0" else echo "$ac_t""no" 1>&6 V_LIB_TCL="FAIL" @@ -1589,13 +1789,13 @@ /usr/contrib/lib \ /usr/local/lib \ /usr/lib \ - $PWD/../tcl7.5 \ - /usr/src/local/tcl7.5 \ - /import/tcl/lib/tcl7.5 \ + $PWD/../tcl8.0 \ + /usr/src/local/tcl8.0 \ + /import/tcl/lib/tcl8.0 \ " for dir in $places; do - if test -r $dir/libtcl7.5.so -o -r $dir/libtcl7.5.a; then - V_LIB_TCL="-L$dir -ltcl7.5" + if test -r $dir/libtcl8.0.so -o -r $dir/libtcl8.0.a; then + V_LIB_TCL="-L$dir -ltcl8.0" break fi if test -r $dir/libtcl.so -o -r $dir/libtcl.a; then @@ -1614,13 +1814,14 @@ fi echo "checking for tcl/init.tcl" V_LIBRARY_TCL=FAIL - places="/usr/local/lib/tcl7.5 \ - /usr/contrib/lib/tcl7.5 \ - /usr/lib/tcl7.5 \ - /usr/lib/tk/tcl7.5 \ - /import/tcl/lib/tcl7.5 \ - $prefix/lib/tcl7.5 \ - $x_libraries/tcl7.5 \ + places="/usr/local/lib/tcl8.0 \ + /usr/contrib/lib/tcl8.0 \ + /usr/lib/tcl8.0 \ + /usr/lib/tk8.0/tcl \ + /usr/lib/tk/tcl8.0 \ + /import/tcl/lib/tcl8.0 \ + $prefix/lib/tcl8.0 \ + $x_libraries/tcl8.0 \ /usr/local/lib/tcl \ /usr/lib/tcl \ /usr/lib/tk/tcl \ @@ -1661,8 +1862,8 @@ echo "can't find tk.h in $d/include" exit 1 fi - places="$d/lib/libtk4.1.so \ - $d/lib/libtk4.1.a \ + places="$d/lib/libtk8.0.so \ + $d/lib/libtk8.0.a \ $d/lib/libtk.so \ $d/lib/libtk.a" V_LIB_TK=FAIL @@ -1676,7 +1877,8 @@ echo "can't find libtk.a in $d/lib" exit 1 fi - places="$d/lib/tk4.1 \ + places="$d/lib/tk8.0 \ + $d/lib/tk8.0 \ $d/lib/tk" V_LIBRARY_TK=FAIL for dir in $places; do @@ -1691,18 +1893,20 @@ fi else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* V_INCLUDE_TK="" else echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* V_INCLUDE_TK=FAIL fi @@ -1718,9 +1922,9 @@ /usr/include\ $x_includes/tk \ $x_includes \ - $PWD/../tk4.1 \ - /usr/src/local/tk4.1 \ - /import/tcl/include/tk4.1 \ + $PWD/../tk8.0 \ + /usr/src/local/tk8.0 \ + /import/tcl/include/tk8.0 \ " for dir in $places; do if test -r $dir/tk.h ; then @@ -1733,26 +1937,28 @@ exit 1 fi fi - echo $ac_n "checking for -ltk4.1""... $ac_c" 1>&6 -ac_lib_var=`echo tk4.1'_'main | tr './+\055' '__p_'` + echo $ac_n "checking for main in -ltk8.0""... $ac_c" 1>&6 +echo "configure:1942: checking for main in -ltk8.0" >&5 +ac_lib_var=`echo tk8.0'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-ltk4.1 $LIBS" +LIBS="-ltk8.0 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -1762,7 +1968,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - V_LIB_TK="-ltk4.1" + V_LIB_TK="-ltk8.0" else echo "$ac_t""no" 1>&6 V_LIB_TK="FAIL" @@ -1775,13 +1981,13 @@ /usr/lib \ /usr/lib/tk \ /import/tcl/lib \ - $PWD/../tk4.1 \ - /usr/src/local/tk4.1 \ + $PWD/../tk8.0 \ + /usr/src/local/tk8.0 \ $prefix/lib \ $x_libraries" for dir in $places; do - if test -r $dir/libtk4.1.so -o -r $dir/libtk4.1.a; then - V_LIB_TK="-L$dir -ltk4.1" + if test -r $dir/libtk8.0.so -o -r $dir/libtk8.0.a; then + V_LIB_TK="-L$dir -ltk8.0" break fi if test -r $dir/libtk.so -o -r $dir/libtk.a; then @@ -1800,15 +2006,16 @@ fi echo "checking for tk/tk.tcl" V_LIBRARY_TK=FAIL - places="/usr/local/lib/tk4.1 \ - /usr/contrib/lib/tk4.1 \ - /usr/lib/tk4.1 \ - /usr/lib/tk/tk4.1 \ - /import/tcl/lib/tk4.1 \ - $prefix/lib/tk4.1 \ - $x_libraries/tk4.1 \ - $PWD/../tk4.1/library \ - /usr/src/local/tk4.1/library \ + places="/usr/local/lib/tk8.0 \ + /usr/contrib/lib/tk8.0 \ + /usr/lib/tk8.0 \ + /usr/lib/tk8.0 \ + /usr/lib/tk/tk8.0 \ + /import/tcl/lib/tk8.0 \ + $prefix/lib/tk8.0 \ + $x_libraries/tk8.0 \ + $PWD/../tk8.0/library \ + /usr/src/local/tk8.0/library \ /usr/local/lib/tk \ /usr/lib/tk \ /usr/lib/tk/tk \ @@ -1842,7 +2049,8 @@ #XXX -V_STATIC="-static" +#V_STATIC="-static" +V_STATIC="" # Check whether --with-aix-shm or --without-aix-shm was given. if test "${with_aix_shm+set}" = set; then @@ -1933,8 +2141,8 @@ V_OBJ_GRABBER="$V_OBJ_GRABBER grabber-qcam.o" V_DEFINE="$V_DEFINE -DQCAMDEV" fi -if test -r /usr/include/linux/scc.h -o -r /usr/include/machine/scc.h ; then - V_OBJ_GRABBER="$V_OBJ_GRABBER grabber-scc.o" +if test -r /usr/include/linux/videodev.h ; then + V_OBJ_GRABBER="$V_OBJ_GRABBER grabber-video4linux.o" fi vpix_dir=/usr/src/local/vfc-1.0 vpix_lib=$vpix_dir/vfc_lib @@ -2131,30 +2339,32 @@ V_LIB_DL="dld" ;; *-*-linux*) - echo $ac_n "checking for -ldl""... $ac_c" 1>&6 -ac_lib_var=`echo dl'_'dlopen | tr './+\055' '__p_'` + echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 +echo "configure:2344: checking for dlopen in -ldl" >&5 +ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -2176,26 +2386,28 @@ ;; esac if test ! -z "$V_LIB_DL" ; then - echo $ac_n "checking for -l$V_LIB_DL""... $ac_c" 1>&6 -ac_lib_var=`echo $V_LIB_DL'_'main | tr './+\055' '__p_'` + echo $ac_n "checking for main in -l$V_LIB_DL""... $ac_c" 1>&6 +echo "configure:2391: checking for main in -l$V_LIB_DL" >&5 +ac_lib_var=`echo $V_LIB_DL'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-l$V_LIB_DL $V_STATIC $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:2406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi @@ -2205,7 +2417,8 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_lib=HAVE_LIB`echo $V_LIB_DL | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + ac_tr_lib=HAVE_LIB`echo $V_LIB_DL | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&1 | - sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ - >> confcache + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache if cmp -s $cache_file confcache; then : else @@ -2350,7 +2577,7 @@ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.10" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -2369,9 +2596,11 @@ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub +s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g @@ -2439,20 +2668,56 @@ CEOF EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac - # Adjust relative srcdir, etc. for subdirectories. + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` @@ -2476,6 +2741,7 @@ top_srcdir="$ac_dots$ac_given_srcdir" ;; esac + echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." @@ -2484,15 +2750,21 @@ # $configure_input" ;; *) ac_comsub= ;; esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g -" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done -rm -f conftest.subs +rm -f conftest.s* +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF diff -uNr vic-2.8.orig/configure.in vic-2.8/configure.in --- vic-2.8.orig/configure.in Fri Jun 21 02:36:47 1996 +++ vic-2.8/configure.in Tue Aug 24 03:00:30 1999 @@ -10,7 +10,8 @@ builtin(include, configure.in.head) #XXX -V_STATIC="-static" +#V_STATIC="-static" +V_STATIC="" AC_ARG_WITH(aix-shm, --with-aix-shm=path specify a pathname for the AIX shm X extension library file, lib=$withval, lib="") if test "$lib" != "" ; then @@ -87,8 +88,8 @@ V_OBJ_GRABBER="$V_OBJ_GRABBER grabber-qcam.o" V_DEFINE="$V_DEFINE -DQCAMDEV" fi -if test -r /usr/include/linux/scc.h -o -r /usr/include/machine/scc.h ; then - V_OBJ_GRABBER="$V_OBJ_GRABBER grabber-scc.o" +if test -r /usr/include/linux/videodev.h ; then + V_OBJ_GRABBER="$V_OBJ_GRABBER grabber-video4linux.o" fi vpix_dir=/usr/src/local/vfc-1.0 vpix_lib=$vpix_dir/vfc_lib diff -uNr vic-2.8.orig/configure.in.tk vic-2.8/configure.in.tk --- vic-2.8.orig/configure.in.tk Thu May 16 04:06:05 1996 +++ vic-2.8/configure.in.tk Tue Aug 24 03:00:30 1999 @@ -12,8 +12,8 @@ echo "can't find tcl.h in $d/include" exit 1 fi - places="$d/lib/libtcl7.5.so \ - $d/lib/libtcl7.5.a \ + places="$d/lib/libtcl8.0.so \ + $d/lib/libtcl8.0.a \ $d/lib/libtcl.so \ $d/lib/libtcl.a" V_LIB_TCL=FAIL @@ -27,7 +27,7 @@ echo "can't find libtcl.a in $d/lib" exit 1 fi - places="$d/lib/tcl7.5 \ + places="$d/lib/tcl8.0 \ $d/lib/tcl" V_LIBRARY_TCL=FAIL for dir in $places; do @@ -44,9 +44,9 @@ AC_TEST_CPP([#include ], V_INCLUDE_TCL="", V_INCLUDE_TCL=FAIL) if test "$V_INCLUDE_TCL" = FAIL; then echo "checking for tcl.h" - places="$PWD/../tcl7.5 \ - /usr/src/local/tcl7.5 \ - /import/tcl/include/tcl7.5 \ + places="$PWD/../tcl8.0 \ + /usr/src/local/tcl8.0 \ + /import/tcl/include/tcl8.0 \ $prefix/include \ $x_includes/tk \ $x_includes \ @@ -64,7 +64,7 @@ exit 1 fi fi - AC_CHECK_LIB(tcl7.5, main, V_LIB_TCL="-ltcl7.5", V_LIB_TCL="FAIL") + AC_CHECK_LIB(tcl8.0, main, V_LIB_TCL="-ltcl8.0", V_LIB_TCL="FAIL") if test "$V_LIB_TCL" = FAIL; then echo "checking for libtcl.a" places="\ @@ -73,13 +73,13 @@ /usr/contrib/lib \ /usr/local/lib \ /usr/lib \ - $PWD/../tcl7.5 \ - /usr/src/local/tcl7.5 \ - /import/tcl/lib/tcl7.5 \ + $PWD/../tcl8.0 \ + /usr/src/local/tcl8.0 \ + /import/tcl/lib/tcl8.0 \ " for dir in $places; do - if test -r $dir/libtcl7.5.so -o -r $dir/libtcl7.5.a; then - V_LIB_TCL="-L$dir -ltcl7.5" + if test -r $dir/libtcl8.0.so -o -r $dir/libtcl8.0.a; then + V_LIB_TCL="-L$dir -ltcl8.0" break fi if test -r $dir/libtcl.so -o -r $dir/libtcl.a; then @@ -98,13 +98,14 @@ fi echo "checking for tcl/init.tcl" V_LIBRARY_TCL=FAIL - places="/usr/local/lib/tcl7.5 \ - /usr/contrib/lib/tcl7.5 \ - /usr/lib/tcl7.5 \ - /usr/lib/tk/tcl7.5 \ - /import/tcl/lib/tcl7.5 \ - $prefix/lib/tcl7.5 \ - $x_libraries/tcl7.5 \ + places="/usr/local/lib/tcl8.0 \ + /usr/contrib/lib/tcl8.0 \ + /usr/lib/tcl8.0 \ + /usr/lib/tk8.0/tcl \ + /usr/lib/tk/tcl8.0 \ + /import/tcl/lib/tcl8.0 \ + $prefix/lib/tcl8.0 \ + $x_libraries/tcl8.0 \ /usr/local/lib/tcl \ /usr/lib/tcl \ /usr/lib/tk/tcl \ @@ -154,6 +155,7 @@ exit 1 fi places="$d/lib/tk4.1 \ + $d/lib/tk8.0 \ $d/lib/tk" V_LIBRARY_TK=FAIL for dir in $places; do @@ -230,6 +232,7 @@ places="/usr/local/lib/tk4.1 \ /usr/contrib/lib/tk4.1 \ /usr/lib/tk4.1 \ + /usr/lib/tk8.0 \ /usr/lib/tk/tk4.1 \ /import/tcl/lib/tk4.1 \ $prefix/lib/tk4.1 \ diff -uNr vic-2.8.orig/encoder-h261.cc vic-2.8/encoder-h261.cc --- vic-2.8.orig/encoder-h261.cc Mon Jul 22 16:12:53 1996 +++ vic-2.8/encoder-h261.cc Tue Aug 24 04:32:22 1999 @@ -631,7 +631,7 @@ if (q < 8) { register int cmin = 0, cmax = 0; register short* bp = lblk; - register i, j; + register int i, j; // Y U and V blocks for (i = 6; --i >= 0; ) { diff -uNr vic-2.8.orig/grabber-video4linux.cc vic-2.8/grabber-video4linux.cc --- vic-2.8.orig/grabber-video4linux.cc Wed Dec 31 21:00:00 1969 +++ vic-2.8/grabber-video4linux.cc Tue Aug 24 05:25:25 1999 @@ -0,0 +1,806 @@ +/* ========================================================================= + + Copyright (c) 1997 Regents of Koji OKAMURA, oka@kobe-u.ac.jp + All rights reserved. + + largely rewritten for new bttv/video4linux interface + by Gerd Knorr + + Updated + by Koji OKAMURA + + Largely updated for v4l for 2.2.x + by Juan J. Sierralta + +========================================================================= */ + + + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + + +extern "C" { +#include +} + +#include "grabber.h" +#include "Tcl.h" +#include "device-input.h" +#include "module.h" + +/* here you can tune the device names */ +const char *devlist[] = { "/dev/video0", NULL }; + +#define BTTV_DEBUG + +// #define DEBUG(x) +#define DEBUG(x) (x) + +#define BT848_COLOR_FMT_YUY2 7 /* FIXME */ + +#define NTSC_WIDTH 640 +#define NTSC_HEIGHT 480 +#define PAL_WIDTH 768 +#define PAL_HEIGHT 576 +#define CIF_WIDTH 352 +#define CIF_HEIGHT 288 + +#define MEM_SIZE (PAL_WIDTH * PAL_HEIGHT * 3) + +#define CF_422 0 +#define CF_411 1 +#define CF_CIF 2 + +class V4lGrabber : public Grabber { +public: + V4lGrabber(const char * cformat, const char *dev); + virtual ~V4lGrabber(); + + virtual int command(int argc, const char*const* argv); + virtual void start(); + virtual void stop(); + virtual int grab(); + +protected: + void format(); + void setsize(); + + void packed422_to_planar422(char *, char*); + void packed422_to_planar411(char *, char*); + + struct video_capability capability; + struct video_channel *channels; + struct video_channel vc; + struct video_picture pict; + + struct video_mbuf vmbuf; + struct video_capture cap; + struct video_window win; + + /* mmap */ + int have_mmap; + int even; + struct video_mmap gb; + char *mem; + + int fd_; + int format_; + int cformat_; + int port_; + int norm; + + unsigned char *tm_; + int width_; + int height_; + int max_width_; + int max_height_; + int decimate_; +}; + +/* ----------------------------------------------------------------- */ + +class V4lDevice : public InputDevice { +public: + V4lDevice(const char *dev, const char*, char *attr); + virtual int command(int argc, const char*const* argv); + +private: + const char *dev_; +}; + + +V4lDevice::V4lDevice(const char *dev, const char *name, char *attr) : InputDevice(name) +{ + dev_ = dev; + attributes_ = attr; + +#ifdef BTTV_DEBUG + fprintf(stderr,"V4l: ==> %s\n",attr); +#endif + +} + +int V4lDevice::command(int argc, const char*const* argv) +{ + Tcl& tcl = Tcl::instance(); + if (argc == 3) { + if (strcmp(argv[1], "open") == 0) { + TclObject* o = 0; + o = new V4lGrabber(argv[2],dev_); + if (o != 0) + tcl.result(o->name()); + return (TCL_OK); + } + } + return (InputDevice::command(argc, argv)); +} + +/* ----------------------------------------------------------------- */ + +class V4lScanner { +public: + V4lScanner(const char **dev); +}; + +static V4lScanner find_video4linux_devices(devlist); + +V4lScanner::V4lScanner(const char **dev) +{ + static const char *palette_name[] = { + "", "grey", "hi240", "rgb16", "rgb24", "rgb32", "rgb15" }; + + struct video_capability capability; + struct video_channel channel; + struct video_picture pict; + int j,i,fd; + char *nick, *attr; + + DEBUG(fprintf(stderr,"V4lScanner\n")); + + for (i = 0; dev[i] != NULL; i++) { +#ifdef BTTV_DEBUG + fprintf(stderr,"V4l: trying %s... \n",dev[i]); +#endif + if (-1 == (fd = open(dev[i],O_RDONLY))) { + perror("open"); + continue; + } + if (-1 == ioctl(fd,VIDIOCGCAP,&capability)) { + perror("ioctl VIDIOCGCAP"); + close(fd); + continue; + } + + if (!(capability.type & VID_TYPE_CAPTURE)) { +#ifdef BTTV_DEBUG + fprintf(stderr,"device can't capture\n"); +#endif + close(fd); + continue; + } +#ifdef BTTV_DEBUG + fprintf(stderr,"ok, %s\nV4l: %s; size: %dx%d => %dx%d%s\n", + capability.name, + capability.type & VID_TYPE_MONOCHROME ? "mono" : "color", + capability.minwidth,capability.minheight, + capability.maxwidth,capability.maxheight, + capability.type & VID_TYPE_SCALES ? " (scales)" : ""); +#endif + attr = new char[512]; + strcpy(attr,"format { 411 422 cif } "); + + if (capability.maxwidth > PAL_WIDTH/2 && + capability.maxheight > PAL_HEIGHT/2) { + strcat(attr,"size {large normal small cif} "); + } else { + strcat(attr,"size { small normal cif } "); + } +#ifdef BTTV_DEBUG + fprintf(stderr,"V4l: ports:"); +#endif + strcat(attr,"port { "); + for (j = 0; j < capability.channels; j++) { + channel.channel = j; + if (-1 == ioctl(fd,VIDIOCGCHAN,&channel)) { + perror("ioctl VIDIOCGCHAN"); + } else { +#ifdef BTTV_DEBUG + fprintf(stderr," %s",channel.name); +#endif + strcat(attr,channel.name); + strcat(attr," "); + } + } +#ifdef BTTV_DEBUG + fprintf(stderr,"\n"); +#endif + strcat(attr,"} "); + + if (-1 == ioctl(fd,VIDIOCGPICT,&pict)) { + perror("ioctl VIDIOCGPICT"); + } +#ifdef BTTV_DEBUG + fprintf(stderr,"V4l: depth=%d, palette=%s\n", + pict.depth,palette_name[pict.palette]); +#endif + + strcat(attr,"type {pal ntsc secam auto} "); + + nick = new char[strlen(capability.name)+6]; + // sprintf(nick,"v4l: %s",capability.name); + sprintf(nick,"v4l"); +#ifdef BTTV_DEBUG + fprintf(stderr,"V4l: Nick : %s\n",nick); +#endif + + close(fd); + new V4lDevice(dev[i],nick,attr); + + + } +} + +/* ----------------------------------------------------------------- */ + +V4lGrabber::V4lGrabber(const char *cformat, const char *dev) +{ + int i,zero=0; + static const char *palette_name[] = { + "", "grey", "hi240", "rgb16", "rgb24", "rgb32", "rgb15" }; + + DEBUG(fprintf(stderr,"V4lGrabber Constructor. Format: %s\n",cformat)); + + fd_ = open(dev, O_RDWR); + if (fd_ < 0) { + perror("open"); + exit(1); + } + + DEBUG(fprintf(stderr,"V4lGrabber Constructor: device open\n")); + + /* ask for capabilities */ + if (-1 == ioctl(fd_,VIDIOCGCAP,&capability)) { + perror("ioctl VIDIOCGCAP"); + exit(1); + } + + channels = (struct video_channel*)calloc(capability.channels,sizeof(struct video_channel)); + + for (i = 0; i < capability.channels; i++) { + channels[i].channel = i; + if (-1 == ioctl(fd_,VIDIOCGCHAN,&channels[i])) { + perror("ioctl VIDIOCGCHAN"); + } + } + + bzero(&pict,sizeof(struct video_picture)); + if (-1 == ioctl(fd_,VIDIOCGPICT,&pict)) { + perror("ioctl VIDIOCGPICT"); + } + else + { + pict.depth=2; + if (-1 == ioctl(fd_,VIDIOCSPICT,&pict)) + perror("ioctl VIDIOCSPICT"); +#ifdef BTTV_DEBUG + fprintf(stderr,"\nV4lGrabber Constructor: Picture\n"); + fprintf(stderr,"\t\tBrightness: %d\tContrast: %d\n\t\tDepth: %d\tPalette: %s\n",pict.brightness,pict.contrast,pict.depth, + palette_name[pict.palette]); +#endif + + } + + /* map grab buffer */ + if(ioctl( fd_, VIDIOCGMBUF, &vmbuf )) + { + fprintf(stderr,"capture_init: Error al pedir buffer para mmap, %s\n", + strerror(errno)); + close(fd_); + exit(1); + } + + if(1) + { + int j; + printf("Capacidades de MMAP:\n" + "\t\tTamaņo:0x%X bytes\n" + "\t\tCuadros:%d\n", vmbuf.size, vmbuf.frames ); + for(j=0;jconsume(&f)); +} + +void V4lGrabber::packed422_to_planar422(char *dest, char *src) +{ + int i; + char *s, *y,*u,*v; + + i = (width_ * height_)/2; + s = src; + y = dest; + u = y + width_ * height_; + v = u + width_ * height_ / 2; + + while (--i) { + *(y++) = *(src++); + *(u++) = *(src++); + *(y++) = *(src++); + *(v++) = *(src++); + } +} + +void V4lGrabber::packed422_to_planar411(char *dest, char *src) +{ + int a,b,i,j; + char *s, *y,*u,*v; + + s = src; + y = dest; + u = y + width_ * height_; + v = u + width_ * height_ / 4; + + /* Process for Cb, Cr */ + for(i=0;i>1; + t += (*s2p & 0xFF00FF00)>>1; + cb = (t>> 8) & 0xFF; + cr = (t>>24) & 0xFF; + s1p++; + s2p++; + + /* 1 */ + t = (*s1p & 0xFF00FF00)>>1; + t += (*s2p & 0xFF00FF00)>>1; + cb |= (t ) & 0xFF00; + cr |= (t>>16) & 0xFF00; + s1p++; + s2p++; + + /* 2 */ + t = (*s1p & 0xFF00FF00)>>1; + t += (*s2p & 0xFF00FF00)>>1; + cb |= (t<< 8) & 0xFF0000; + cr |= (t>> 8) & 0xFF0000; + s1p++; + s2p++; + + /* 3 */ + t = (*s1p & 0xFF00FF00)>>1; + t += (*s2p & 0xFF00FF00)>>1; + cb |= (t<<16) & 0xFF000000; + cr |= (t ) & 0xFF000000; + s1p++; + s2p++; + + *dpcb = cb; + dpcb++; + *dpcr = cr; + dpcr++; + } + } + + /* Process for Y */ + for(i=0;i>8) & 0xFF00); + sp++; + + /* 2 y 3 */ + t = *sp; + y |= ((t<<16) & 0xFF0000) | ((t<<8) & 0xFF000000); + sp++; + + *dpy = y; + dpy++; + } + } + + +} + +void V4lGrabber::format() +{ + DEBUG(fprintf(stderr,"V4lGrabber:format \n")); + + width_ = CIF_WIDTH *2 / decimate_; + height_ = CIF_HEIGHT *2 / decimate_; + + if (have_mmap) + { + // gb.frame = 0; + gb.format = VIDEO_PALETTE_YUV422; + if ((norm == 1) && (decimate_ == 1)) + { + gb.width = NTSC_WIDTH; + gb.height = NTSC_HEIGHT; + width_ = NTSC_WIDTH; + height_ = NTSC_HEIGHT; + } else + { + gb.width = width_; + gb.height = height_; + } + } + else { + memset(&win,0,sizeof(win)); + win.width = width_; + win.height = height_; + if (-1 == ioctl(fd_,VIDIOCSWIN,&win)) + perror("ioctl VIDIOCSWIN"); + if (-1 == ioctl(fd_,VIDIOCGWIN,&win)) + perror("ioctl VIDIOCGWIN"); + width_ = win.width; + height_ = win.height; + } + + switch (cformat_) { + case CF_CIF: + set_size_411(width_, height_); + DEBUG(fprintf(stderr,"Format: cif \n")); + break; + case CF_411: + set_size_411(width_, height_); + DEBUG(fprintf(stderr,"Format: 411 \n")); + break; + case CF_422: + set_size_422(width_, height_); + DEBUG(fprintf(stderr,"Format: 422\n")); + break; + } + + DEBUG(fprintf(stderr," Size=%dx%d \n",width_,height_)); + + allocref(); +} diff -uNr vic-2.8.orig/grabber.cc vic-2.8/grabber.cc --- vic-2.8.orig/grabber.cc Mon Feb 5 21:02:00 1996 +++ vic-2.8/grabber.cc Tue Aug 24 03:43:55 1999 @@ -69,6 +69,7 @@ hstart_(0), hstop_(0), framebase_(0), frame_(0), inw_(0), inh_(0), outw_(0), outh_(0), + threshold_(48), target_(0), tx_(0) { bps(128); @@ -120,6 +121,10 @@ running_ = 0; } } + return (TCL_OK); + } + if (strcmp(argv[1], "threshold") == 0) { + threshold_ = 8*atoi(argv[2]); return (TCL_OK); } if (strcmp(argv[1], "fps") == 0) { diff -uNr vic-2.8.orig/grabber.h vic-2.8/grabber.h --- vic-2.8.orig/grabber.h Mon Feb 5 21:02:00 1996 +++ vic-2.8/grabber.h Tue Aug 24 03:43:55 1999 @@ -87,6 +87,7 @@ int vstop_; int hstart_; int hstop_; + int threshold_ ; // when a block is changed ? (was constant 48) u_int framesize_; u_char* framebase_; @@ -160,19 +161,19 @@ rb -= _rs << 3; \ \ int center = 0; \ - if (left >= 48 && x > 0) { \ + if (left >= threshold_ && x > 0) { \ crv[-1] = CR_MOTION|CR_SEND; \ center = 1; \ } \ - if (right >= 48 && x < w - 1) { \ + if (right >= threshold_ && x < w - 1) { \ crv[1] = CR_MOTION|CR_SEND; \ center = 1; \ } \ - if (bottom >= 48 && y < blkh_ - 1) { \ + if (bottom >= threshold_ && y < blkh_ - 1) { \ crv[w] = CR_MOTION|CR_SEND; \ center = 1; \ } \ - if (top >= 48 && y > 0) { \ + if (top >= threshold_ && y > 0) { \ crv[-w] = CR_MOTION|CR_SEND; \ center = 1; \ } \ Binary files vic-2.8.orig/histtolut and vic-2.8/histtolut differ diff -uNr vic-2.8.orig/inet.h vic-2.8/inet.h --- vic-2.8.orig/inet.h Mon Feb 5 21:02:04 1996 +++ vic-2.8/inet.h Tue Aug 24 03:00:30 1999 @@ -94,7 +94,7 @@ #define INADDR_LOOPBACK (u_int32_t)0x7F000001 #endif -#if defined(__linux__) || defined(WIN32) +#if defined(WIN32) struct msghdr { caddr_t msg_name; /* optional address */ u_int msg_namelen; /* size of address */ diff -uNr vic-2.8.orig/iohandler.cc vic-2.8/iohandler.cc --- vic-2.8.orig/iohandler.cc Sat May 18 14:27:23 1996 +++ vic-2.8/iohandler.cc Tue Aug 24 04:31:05 1999 @@ -132,7 +132,7 @@ } #else - Tk_CreateFileHandler((ClientData)fd, mask, callback, (ClientData)this); + Tk_CreateFileHandler(fd, mask, callback, (ClientData)this); #endif } @@ -151,7 +151,7 @@ } #else if (fd_ >= 0) { - Tk_DeleteFileHandler((ClientData)fd_); + Tk_DeleteFileHandler(fd_); fd_ = -1; } #endif diff -uNr vic-2.8.orig/jpeg/jpeg.cc vic-2.8/jpeg/jpeg.cc --- vic-2.8.orig/jpeg/jpeg.cc Fri Mar 1 04:03:20 1996 +++ vic-2.8/jpeg/jpeg.cc Tue Aug 24 04:42:59 1999 @@ -139,7 +139,7 @@ dct_unbias_ = 1; short *sp = (short *)frm_; - for (register i = 0; i < n / (BMB * 64) ; i++) { + for (register int i = 0; i < n / (BMB * 64) ; i++) { *sp = DCT_GRAY; sp += 64; *sp = DCT_GRAY; @@ -173,7 +173,7 @@ dct_unbias_ = 1; short *sp = (short*)frm_; - for (register i = 0; i < n / (BMB * 64) ; i++) { + for (register int i = 0; i < n / (BMB * 64) ; i++) { *sp = DCT_GRAY; sp += 64; *sp = DCT_GRAY; diff -uNr vic-2.8.orig/main.cc vic-2.8/main.cc --- vic-2.8.orig/main.cc Mon Jul 22 16:12:22 1996 +++ vic-2.8/main.cc Tue Aug 24 03:00:30 1999 @@ -177,7 +177,7 @@ else { Tk_Window tk = t.tkmain(); Tk_Uid uid = Tk_GetUid((char*)argv[1]); - XFontStruct* p = Tk_GetFontStruct(t.interp(), tk, uid); + Tk_Font p = Tk_GetFont(t.interp(), tk, uid); t.result(p != 0 ? "1" : "0"); } return (TCL_OK); @@ -446,6 +446,7 @@ "set argv \"-name vic\"", display); Tk_Window tk = 0; + Tcl_Init(tcl.interp()); if (Tk_Init(tcl.interp()) == TCL_OK) tk = Tk_MainWindow(tcl.interp()); if (tk == 0) { diff -uNr vic-2.8.orig/net-ip.cc vic-2.8/net-ip.cc --- vic-2.8.orig/net-ip.cc Wed Jun 26 20:56:39 1996 +++ vic-2.8/net-ip.cc Tue Aug 24 04:29:03 1999 @@ -204,7 +204,7 @@ memset((char *)p, 0, sizeof(*p)); p->sin_family = AF_INET; int len = sizeof(*p); - if (getsockname(ssock_, (struct sockaddr *)p, &len) < 0) { + if (getsockname(ssock_, (struct sockaddr *)p,(socklen_t *) &len) < 0) { perror("getsockname"); p->sin_addr.s_addr = 0; p->sin_port = 0; diff -uNr vic-2.8.orig/net.cc vic-2.8/net.cc --- vic-2.8.orig/net.cc Fri Jun 7 16:37:16 1996 +++ vic-2.8/net.cc Tue Aug 24 04:28:38 1999 @@ -299,7 +299,7 @@ sockaddr_in sfrom; int fromlen = sizeof(sfrom); int cc = ::recvfrom(fd, (char*)buf, len, 0, - (sockaddr*)&sfrom, &fromlen); + (sockaddr*)&sfrom,(socklen_t *) &fromlen); if (cc < 0) { if (errno != EWOULDBLOCK) perror("recvfrom"); diff -uNr vic-2.8.orig/ntp-time.h vic-2.8/ntp-time.h --- vic-2.8.orig/ntp-time.h Fri Mar 22 12:31:56 1996 +++ vic-2.8/ntp-time.h Tue Aug 24 03:13:49 1999 @@ -55,7 +55,7 @@ /* * Number of seconds between 1-Jan-1900 and 1-Jan-1970 */ -#define GETTIMEOFDAY_TO_NTP_OFFSET 2208988800 +#define GETTIMEOFDAY_TO_NTP_OFFSET 2208988800U /* * Return a 64-bit ntp timestamp (UTC time relative to Jan 1, 1970). diff -uNr vic-2.8.orig/p64/mkhuff.cc vic-2.8/p64/mkhuff.cc --- vic-2.8.orig/p64/mkhuff.cc Tue Feb 6 02:05:57 1996 +++ vic-2.8/p64/mkhuff.cc Tue Aug 24 04:44:19 1999 @@ -36,6 +36,7 @@ "@(#) $Header: mkhuff.cc,v 1.8 96/02/05 21:05:46 mccanne Exp $ (LBL)"; #endif +#include #include #include #include diff -uNr vic-2.8.orig/tkStripchart.c vic-2.8/tkStripchart.c --- vic-2.8.orig/tkStripchart.c Sat Mar 16 17:14:00 1996 +++ vic-2.8/tkStripchart.c Tue Aug 24 03:00:30 1999 @@ -571,7 +571,7 @@ free(StripchartPtr->value); if (StripchartPtr->fontPtr != NULL) - Tk_FreeFontStruct(StripchartPtr->fontPtr); + Tk_FreeFont(StripchartPtr->fontPtr); if (StripchartPtr->textColorPtr != NULL) Tk_FreeColor(StripchartPtr->textColorPtr); diff -uNr vic-2.8.orig/transcoder-jpeg.cc vic-2.8/transcoder-jpeg.cc --- vic-2.8.orig/transcoder-jpeg.cc Tue Nov 14 02:46:58 1995 +++ vic-2.8/transcoder-jpeg.cc Tue Aug 24 04:32:57 1999 @@ -138,7 +138,7 @@ rval = target_->consume(df); // update CR vec - register blkno; + register int blkno; int s; for (blkno = 0; blkno < crvlen_; blkno++) { s = CR_STATE(crvec_[blkno]); diff -uNr vic-2.8.orig/ui-ctrlmenu.tcl vic-2.8/ui-ctrlmenu.tcl --- vic-2.8.orig/ui-ctrlmenu.tcl Wed Jun 26 21:27:48 1996 +++ vic-2.8/ui-ctrlmenu.tcl Tue Aug 24 05:15:39 1999 @@ -390,10 +390,17 @@ -relief raised -command transmit \ -anchor w -variable transmitButtonState -font $f \ -state disabled -highlightthickness 0 +# Juanjo: I don't know how to handle this by the moment +# checkbutton $w.freeze -text "Freeze" \ +# -relief raised -command "grabber freeze \$freeze" \ +# -anchor w -variable freeze -font $f \ +# -highlightthickness 0 + button $w.release -text "Release" \ -relief raised -command release_device \ -font $f -highlightthickness 0 +# pack $w.send $w.release $w.freeze -fill both pack $w.send $w.release -fill both } @@ -434,8 +441,9 @@ frame $w.bps scale $w.bps.scale -orient horizontal -font $f \ - -showvalue 0 -from 10 -to [option get . maxbw Vic] \ + -showvalue 0 -from 1 -to [option get . maxbw Vic] \ -command "set_bps $w.bps.value" -width 12 \ + -sliderlength 20 \ -relief groove label $w.bps.value -font $f -width 8 -anchor w @@ -443,6 +451,7 @@ scale $w.fps.scale -font $f -orient horizontal \ -showvalue 0 -from 1 -to 30 \ -command "set_fps $w.fps.value" -width 12 \ + -sliderlength 20 \ -relief groove label $w.fps.value -font $f -width 8 -anchor w @@ -564,7 +573,7 @@ proc select_device device { global transmitButton sizeButtons portButton formatButtons \ videoFormat defaultFormat lastDevice defaultPort inputPort \ - transmitButtonState + transmitButtonState typeButton # # Remember settings of various controls for previous device @@ -607,6 +616,11 @@ } else { $portButton configure -state disabled } + if [device_supports $device type *] { + $typeButton configure -state normal + } else { + $typeButton configure -state disabled + } insert_grabber_panel [$device nickname] @@ -774,7 +788,8 @@ build.encoder_options $w.options build.device $w.device build.port $w.port - pack $w.device $w.port $w.options -fill x + build.type $w.type + pack $w.device $w.port $w.type $w.options -fill x } proc build.encoder_options w { @@ -1172,6 +1187,9 @@ global inputPort inputType portButton typeButton if { [$portButton cget -state] == "normal" } { $grabber port $inputPort + } + if { [$typeButton cget -state] == "normal" } { + $grabber type $inputType } setFillRate update diff -uNr vic-2.8.orig/ui-grabber.tcl vic-2.8/ui-grabber.tcl --- vic-2.8.orig/ui-grabber.tcl Fri Jun 21 00:39:35 1996 +++ vic-2.8/ui-grabber.tcl Tue Aug 24 04:54:11 1999 @@ -39,65 +39,98 @@ # called foo-1, foo-2, etc. and you'll only need build.foo # +proc build.v4l w { + + build.slicvideo $w + +} +proc build.meteor w { +# +# The meteor has the same controls as the slicvideo, so just call that +# routine to build the controls. + + build.slicvideo $w +} + +proc build.bktr w { + build.slicvideo $w +} + proc build.slicvideo w { set f [smallfont] +# set f "-*-helvetica-medium-r-normal--*-100-75-75-*-*-*-*" label $w.title -text "Grabber" frame $w.f -relief sunken -borderwidth 2 frame $w.f.h -relief flat - label $w.f.h.label -font $f -anchor e -text "Hue" - - scale $w.f.h.scale -orient horizontal -width 12 -length 20 \ - -relief groove -showvalue 0 -from -128 -to 127 \ - -command "grabber set HUE" - pack $w.f.h.label $w.f.h.scale -side left -fill x -expand 1 - - frame $w.f.ll -relief flat - - label $w.f.ll.label -font $f -text "Luma" -anchor s - - label $w.f.ll.clabel -font $f -text "Contrast" -anchor s - - label $w.f.ll.blabel -font $f -text "Brightness" -anchor s - pack $w.f.ll.clabel $w.f.ll.label $w.f.ll.blabel \ + frame $w.f.h.c + label $w.f.h.c.l1 -font $f -anchor e -text "Chan:" + mk.entry $w.f.h.c do_chan "20" + $w.f.h.c.entry configure -relief sunken -width 5 + bind $w.f.h.c.entry "grabber chan \[$w.f.h.c.entry get\]" + pack $w.f.h.c.l1 $w.f.h.c.entry -side top + + global ths + scale $w.f.h.ths \ +-orient horizontal -width 12 -length 60 -relief groove -sliderlength 6 \ + -showvalue 0 -from 1 -to 10 \ + -command "grabber threshold" -label Thre + $w.f.h.ths set 6 + # the actual scale is multiplied by 8 + scale $w.f.h.scale \ +-orient horizontal -width 12 -length 100 -relief groove \ + -showvalue 0 -from -128 -to 127 \ + -command "grabber hue" -label Hue + pack $w.f.h.c \ + $w.f.h.ths \ + $w.f.h.scale \ -side left -fill x -expand 1 +# frame $w.f.ll -relief flat +# label $w.f.ll.label -font $f -text "Luma" -anchor s +# label $w.f.ll.clabel -font $f -text "Contrast" -anchor s +# label $w.f.ll.blabel -font $f -text "Brightness" -anchor s +# pack $w.f.ll.clabel $w.f.ll.label $w.f.ll.blabel \ +# -side left -fill x -expand 1 + frame $w.f.l -relief flat - scale $w.f.l.cscale -orient horizontal -width 12 -relief groove \ + scale $w.f.l.cscale \ +-orient horizontal -width 12 -length 100 -relief groove \ -showvalue 0 -from 0 -to 127 \ - -command "grabber set LUMA_CONTRAST" + -label "Contrast" \ + -command "grabber contrast" - scale $w.f.l.bscale -orient horizontal -width 12 -relief groove \ + scale $w.f.l.bscale \ +-orient horizontal -width 12 -length 100 -relief groove \ -showvalue 0 -from 0 -to 255 \ - -command "grabber set LUMA_BRIGHTNESS" + -command "grabber brightness" -label "Brightness" pack $w.f.l.cscale $w.f.l.bscale -side left -fill x -expand 1 - frame $w.f.cl -relief flat - - label $w.f.cl.label -font $f -text "Chroma" -anchor n - - label $w.f.cl.glabel -font $f -text "Gain" -anchor n - - label $w.f.cl.slabel -font $f -text "Saturation" -anchor n - pack $w.f.cl.glabel $w.f.cl.label $w.f.cl.slabel \ - -side left -fill x -expand 1 +# frame $w.f.cl -relief flat +# label $w.f.cl.label -font $f -text "Chroma" -anchor n +# label $w.f.cl.glabel -font $f -text "Gain" -anchor n +# label $w.f.cl.slabel -font $f -text "Saturation" -anchor n +# pack $w.f.cl.glabel $w.f.cl.label $w.f.cl.slabel \ +# -side left -fill x -expand 1 frame $w.f.c -relief flat - scale $w.f.c.gscale -orient horizontal -width 12 -relief groove \ + scale $w.f.c.gscale \ +-orient horizontal -width 12 -length 100 -relief groove \ -showvalue 0 -from 0 -to 255 \ - -command "grabber set CHROMA_GAIN" + -command "grabber uvgain" -label "Chr. Gain" - scale $w.f.c.sscale -orient horizontal -width 12 -relief groove \ + scale $w.f.c.sscale \ +-orient horizontal -width 12 -length 100 -relief groove \ -showvalue 0 -from 0 -to 127 \ - -command "grabber set CHROMA_SATURATION" + -command "grabber saturation" -label "Saturation" pack $w.f.c.gscale $w.f.c.sscale -side left -fill x -expand 1 - pack $w.f.h $w.f.ll $w.f.l $w.f.c $w.f.cl \ - -fill x -expand 1 -padx 1m + # pack $w.f.h $w.f.ll $w.f.l $w.f.c $w.f.cl + pack $w.f.h $w.f.l $w.f.c -fill x -expand 1 -padx 1m pack $w.title $w.f -fill x -expand 1 @@ -109,6 +142,10 @@ $w.f.c.sscale set 64 } +# +# STILL image-grabber (?) +# + proc build.still w { set f [smallfont] @@ -131,6 +168,10 @@ $lastDevice file $s } +# +# quickcam grabber +# + proc build.qcam {w} { global qcamwindow @@ -190,3 +231,118 @@ set qcamwindow(setwbal) "$w.f.s.s.wbal.scale set" set qcamwindow(setbpp) "set qcambpp" } + +# +# X11 Grabber controls +# +proc x11grabUpdatePos {x y w h} { + + global x11grabcontrols + set w $x11grabcontrols + + if {[string compare $x [$w.x11grab.row1.pos.x.e get]] != 0} { + $w.x11grab.row1.pos.x.e delete 0 end + $w.x11grab.row1.pos.x.e insert 0 $x + } + if {[string compare $y [$w.x11grab.row1.pos.y.e get]] != 0} { + $w.x11grab.row1.pos.y.e delete 0 end + $w.x11grab.row1.pos.y.e insert 0 $y + } + if {[string compare $w [$w.x11grab.row1.pos.w.e get]] != 0} { + $w.x11grab.row1.pos.w.e delete 0 end + $w.x11grab.row1.pos.w.e insert 0 $w + } + if {[string compare $h [$w.x11grab.row1.pos.h.e get]] != 0} { + $w.x11grab.row1.pos.h.e delete 0 end + $w.x11grab.row1.pos.h.e insert 0 $h + } +} + +proc x11cmd.update.geo w { + grabber fixed [$w.row.x get] [$w.row.y get] +} + +proc x11cmd.fixed {} { + global x11Source x11grabcontrols + set w $x11grabcontrols + $w.label configure -text "$x11Source" + if [winfo exists $w.row] { + destroy $w.row + } + frame $w.row + pack append $w.row \ + [label $w.row.xl -text "X:" -width 2 -anchor e] {left filly} \ + [entry $w.row.x -relief flat -width 4] {left filly} \ + [label $w.row.yl -text "Y:" -width 2 -anchor e] {left filly} \ + [entry $w.row.y -relief flat -width 4] {left filly} + bind $w.row.x "x11cmd.update.geo $w" + bind $w.row.y "x11cmd.update.geo $w" + + pack $w.row -after $w.label +} + +proc x11cmd.pointer {} { + global x11Source x11grabcontrols + set w $x11grabcontrols + $w.label configure -text "$x11Source" + if [winfo exists $w.row] { + destroy $w.row + } + frame $w.row + pack append $w.row \ + [button $w.row.s -text "Follow pointer" ] { left filly } + pack $w.row -after $w.label +} + +proc x11cmd.window {} { + global x11Source x11grabcontrols + puts "x11cmd -- x11Source $x11Source" + set w $x11grabcontrols + $w.label configure -text "$x11Source" + if [winfo exists $w.row] { + destroy $w.row + } + frame $w.row + pack append $w.row \ + [button $w.row.s -text "Select window" ] { left filly } + pack $w.row -after $w.label +} + +proc build.x11 w { + global x11grabcontrols x11Source + set f [smallfont] + + label $w.title -text "X11 Grabber controls" + frame $w.x11grab -relief sunken -borderwidth 2 + set x11grabcontrols $w.x11grab + set x11Source "Fixed" + set w1 $w.x11grab + + + # luigi + set m $w1.menu + set m1 $m.m1 + menubutton $w1.menu -menu $m1 -text "Source:" \ + -relief raised -width 7 -font $f + label $w1.label -width 6 -font $f + frame $w1.row + menu $m1 + $m1 add radiobutton -label Fixed \ + -state active \ + -command "x11cmd.fixed" -font $f -variable x11Source +# $m1 add radiobutton -label Pointer \ +# -command "x11cmd.pointer" -font $f -variable x11Source +# $m1 add radiobutton -label Window \ +# -command "x11cmd.window" -font $f -variable x11Source + + pack append $w1 \ + $w1.menu {left} \ + $w1.label {left} \ + $w1.row {left} + + pack $w $w.title $w1 -fill x -expand 1 + + x11cmd.fixed +} + +### end of file ### diff -uNr vic-2.8.orig/ui-resource.tcl vic-2.8/ui-resource.tcl --- vic-2.8.orig/ui-resource.tcl Tue Apr 2 22:33:56 1996 +++ vic-2.8/ui-resource.tcl Tue Aug 24 03:43:55 1999 @@ -140,7 +140,7 @@ option add Vic.useHardwareDecode false startupFile option add Vic.infoHighlightColor LightYellow2 startupFile option add Vic.useJPEGforH261 false startupFile - option add Vic.stillGrabber false startupFile + option add Vic.stillGrabber true startupFile ; # XXX was false option add Vic.siteDropTime "300" startupFile # diff -uNr vic-2.8.orig/version.c vic-2.8/version.c --- vic-2.8.orig/version.c Wed Dec 31 21:00:00 1969 +++ vic-2.8/version.c Tue Aug 24 03:14:43 1999 @@ -0,0 +1 @@ +char version[] = "2.8";