From: <lep...@us...> - 2006-07-31 21:27:40
|
Revision: 7096 Author: lephilousophe Date: 2006-07-31 14:27:23 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/amsn/?rev=7096&view=rev Log Message: ----------- No time : comit configure script as is... Should work but now under Nux needs LibPng and LibJpeg installed on system... Modified Paths: -------------- trunk/amsn/Makefile.in trunk/amsn/configure trunk/amsn/configure.ac trunk/amsn/utils/TkCximage/src/CxImage/cximage.dsp trunk/amsn/utils/TkCximage/src/CxImage/ximagif.cpp trunk/amsn/utils/TkCximage/src/CxImage/ximajpg.cpp trunk/amsn/utils/TkCximage/src/CxImage/ximajpg.h trunk/amsn/utils/TkCximage/src/CxImage/ximapng.h trunk/amsn/utils/TkCximage/src/Rules.mk Modified: trunk/amsn/Makefile.in =================================================================== --- trunk/amsn/Makefile.in 2006-07-31 13:39:29 UTC (rev 7095) +++ trunk/amsn/Makefile.in 2006-07-31 21:27:23 UTC (rev 7096) @@ -50,7 +50,6 @@ LFS_FLAGS := -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 LIB_FLAGS := -I. -I$(capture_dir) -I$(capture_dir)/libng -I$(capture_dir)/structs LIB_FLAGS += -I$(webcamsn_dir)/src -I$(tkcximage_dir)/src -I$(tkcximage_dir)/src/CxImage -LIB_FLAGS += -I$(tkcximage_dir)/src/zlib -I$(tkcximage_dir)/src/png -I$(tkcximage_dir)/src/jpeg LIBDIR := @LIBDIR@ @@ -100,10 +99,12 @@ CXXFLAGS += -fPIC # libraries -LDLIBS := @LDLIBS@ +LDLIBS := @LDLIBS@ -lpng -lz -lm -ljpeg LDFLAGS := @LDFLAGS@ ifeq (@DEBUG@,no) + ifneq (@FOUND_OS@,mac) LDFLAGS += -s + endif endif X_LIBS := @X_LIBS@ CXX_LIB := @CXX_LIB@ @@ -224,9 +225,6 @@ include $(tkcximage_dir)/Rules.mk include $(tkcximage_dir)/src/Rules.mk include $(tkcximage_dir)/src/CxImage/Rules.mk -include $(tkcximage_dir)/src/zlib/Rules.mk -include $(tkcximage_dir)/src/png/Rules.mk -include $(tkcximage_dir)/src/jpeg/Rules.mk include $(tkcximage_dir)/src/Rules.mk include $(webcamsn_dir)/Rules.mk Modified: trunk/amsn/configure =================================================================== --- trunk/amsn/configure 2006-07-31 13:39:29 UTC (rev 7095) +++ trunk/amsn/configure 2006-07-31 21:27:23 UTC (rev 7096) @@ -272,7 +272,44 @@ PACKAGE_BUGREPORT= ac_unique_file="amsn" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS APPVERSION APPNAME APPRELEASE APPSTABLE DEBUG STATIC CONFIGURE_ARGS ac_prefix_program CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX TCLSH TOP_DIR LIBDIR BUILD_DIR TCL_LIB_DIR TCL_INC_SPEC TK_VERSION TK_LIB TK_LIBS TK_LIB_DIR TK_INC_SPEC TCL_STUB_LIB_SPEC TK_STUB_LIB_SPEC CXX_LIB LDLIBS FOUND_X11 FOUND_OS CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS LIBPTHREAD USE_MMX LIBOBJS LTLIBOBJS' +# Factoring default headers for most tests. +ac_includes_default="\ +#include <stdio.h> +#if HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#if HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#if STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# if HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include <memory.h> +# endif +# include <string.h> +#endif +#if HAVE_STRINGS_H +# include <strings.h> +#endif +#if HAVE_INTTYPES_H +# include <inttypes.h> +#else +# if HAVE_STDINT_H +# include <stdint.h> +# endif +#endif +#if HAVE_UNISTD_H +# include <unistd.h> +#endif" + +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS APPVERSION APPNAME APPRELEASE APPSTABLE DEBUG STATIC CONFIGURE_ARGS ac_prefix_program CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX TCLSH TOP_DIR LIBDIR BUILD_DIR TCL_LIB_DIR TK_VERSION TK_LIB TK_LIBS TK_LIB_DIR TCL_INC_SPEC TK_INC_SPEC TCL_STUB_LIB_SPEC TK_STUB_LIB_SPEC CXX_LIB LDLIBS FOUND_X11 FOUND_OS CPP X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS EGREP LIBPTHREAD USE_MMX LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1319,8 +1356,41 @@ CONFIGURE_ARGS=`echo $@` +#`uname -s` +case "Darwin" in + Linux) + FOUND_OS="linux" + ;; + OpenBSD | FreeBSD | NetBSD) + # *BSD has important stuff (from ports) + # in /usr/local ... + CFLAGS="$CFLAGS -I/usr/local/include -L/usr/local/lib" + LDFLAGS="$LDFLAGS -L/usr/local/lib" + FOUND_OS="bsd" + ;; + Darwin) + FOUND_OS="mac" + CFLAGS="$CFLAGS -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" + CXXFLAGS="$CXXFLAGS -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" + LDFLAGS="$LDFLAGS -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wl,-single_module" + # Directories in which the Tcl core can be found + TCL_INC_SPEC="-I../../Frameworks/Tcl.framework/Headers -DUSE_TCL_STUBS" + TCL_STUB_LIB_SPEC="-L../../Frameworks/Tcl.framework -ltclstub8.4\${TCL_DBGX}" + # Directories in which the Tk core can be found + TK_INC_SPEC="-I../../Frameworks/Tk.framework/Headers -DUSE_TK_STUBS" + TK_STUB_LIB_SPEC="-L../../Frameworks/Tk.framework -ltkstub8.4\${TK_DBGX}" + ;; + *) + echo "$as_me:$LINENO: checking if amsn will build on \`uname -s\`" >&5 +echo $ECHO_N "checking if amsn will build on \`uname -s\`... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: maybe" >&5 +echo "${ECHO_T}maybe" >&6 + FOUND_OS="unknown" + ;; +esac + if test "x$prefix" = xNONE; then echo $ECHO_N "checking for prefix by $ECHO_C" >&6 # Extract the first word of "wish", so it can be a program name with args. @@ -2726,284 +2796,286 @@ -#-------------------------------------------------------------------- -# Read in configuration information generated by Tcl for shared -# libraries, and arrange for it to be substituted into our -# Makefile. -#-------------------------------------------------------------------- +if test $FOUND_OS != "mac"; then + #-------------------------------------------------------------------- + # Read in configuration information generated by Tcl for shared + # libraries, and arrange for it to be substituted into our + # Makefile. + #-------------------------------------------------------------------- -echo "$as_me:$LINENO: checking tcl build dir" >&5 + echo "$as_me:$LINENO: checking tcl build dir" >&5 echo $ECHO_N "checking tcl build dir... $ECHO_C" >&6 -TCL_LIB_DIR=$exec_prefix/lib -dirs=" /usr/lib/tcl8.4a* \ - /usr/local/lib/tcl8.4a* \ - /usr/lib/tcl8.4b* \ - /usr/local/lib/tcl8.4b* \ - /usr/lib/tcl8.4 \ - /usr/lib/tcl8.4.* \ - /usr/local/lib/tcl8.4 \ - /usr/local/lib/tcl8.4.* \ - /usr/lib/tcl8.5 \ - /usr/lib/tcl8.5.* \ - /usr/local/lib/tcl8.5 \ - /usr/local/lib/tcl8.5.* \ - /Library/Frameworks/Tcl.framework \ - /Library/Frameworks/Tcl.framework/Versions/8.3 \ - /Library/Frameworks/Tcl.framework/Versions/8.4 \ - /Library/Frameworks/Tcl.framework/Versions/8.5 \ - /usr/local/lib \ - /usr/lib \ - /usr/local/lib64 \ - /usr/lib64 \ - /usr/lib64/tcl8.4a* \ - /usr/local/lib64/tcl8.4a* \ - /usr/lib64/tcl8.4b* \ - /usr/local/lib64/tcl8.4b* \ - /usr/lib64/tcl8.4 \ - /usr/lib64/tcl8.4.* \ - /usr/local/lib64/tcl8.4 \ - /usr/local/lib64/tcl8.4.* \ - /usr/lib64/tcl8.5 \ - /usr/lib64/tcl8.5.* \ - /usr/local/lib64/tcl8.5 \ - /usr/local/lib64/tcl8.5.* \ - `locate tclConfig.sh`" + TCL_LIB_DIR=$exec_prefix/lib + dirs=" /usr/lib/tcl8.4a* \ + /usr/local/lib/tcl8.4a* \ + /usr/lib/tcl8.4b* \ + /usr/local/lib/tcl8.4b* \ + /usr/lib/tcl8.4 \ + /usr/lib/tcl8.4.* \ + /usr/local/lib/tcl8.4 \ + /usr/local/lib/tcl8.4.* \ + /usr/lib/tcl8.5 \ + /usr/lib/tcl8.5.* \ + /usr/local/lib/tcl8.5 \ + /usr/local/lib/tcl8.5.* \ + /Library/Frameworks/Tcl.framework \ + ~/Library/Frameworks/Tcl.framework \ + /Network/Library/Frameworks/Tcl.framework \ + /System/Library/Frameworks/Tcl.framework \ + /usr/local/lib \ + /usr/lib \ + /usr/local/lib64 \ + /usr/lib64 \ + /usr/lib64/tcl8.4a* \ + /usr/local/lib64/tcl8.4a* \ + /usr/lib64/tcl8.4b* \ + /usr/local/lib64/tcl8.4b* \ + /usr/lib64/tcl8.4 \ + /usr/lib64/tcl8.4.* \ + /usr/local/lib64/tcl8.4 \ + /usr/local/lib64/tcl8.4.* \ + /usr/lib64/tcl8.5 \ + /usr/lib64/tcl8.5.* \ + /usr/local/lib64/tcl8.5 \ + /usr/local/lib64/tcl8.5.* \ + `locate tclConfig.sh`" -for i in $dirs ; do + for i in $dirs ; do - if test -f "$i"; then - i=`dirname $i` - fi + if test -f "$i"; then + i=`dirname $i` + fi - if test -d "$i" -a -f "$i/tclConfig.sh"; then - file=$i/tclConfig.sh - . $file + if test -d "$i" -a -f "$i/tclConfig.sh"; then + file=$i/tclConfig.sh + . $file - if test "x${version_ok}" != "xyes"; then - VERSION=${TCL_VERSION} - fi + if test "x${version_ok}" != "xyes"; then + VERSION=${TCL_VERSION} + fi - if test "x${TCL_INC_DIR}" != "x" -o "x${TCL_INC_SPEC}" != "x" \ - -o "x${TCL_INCLUDE_DIR}" != "x" -o "x${TCL_INCLUDE_SPEC}" != "x"; then - if test "x${TCL_VERSION}" == "x${VERSION}" ; then - TCL_LIB_DIR=`cd $i; pwd` - break; - fi - elif test -f ${TCL_PREFIX}/include/tcl.h; then - TCL_LIB_DIR=`cd $i; pwd` - break; - fi + if test "x${TCL_INC_DIR}" != "x" -o "x${TCL_INC_SPEC}" != "x" \ + -o "x${TCL_INCLUDE_DIR}" != "x" -o "x${TCL_INCLUDE_SPEC}" != "x"; then + if test "x${TCL_VERSION}" == "x${VERSION}" ; then + TCL_LIB_DIR=`cd $i; pwd` + break; + fi + elif test -f ${TCL_PREFIX}/include/tcl.h; then + TCL_LIB_DIR=`cd $i; pwd` + break; + fi - fi + fi -done + done # Check whether --with-tcl or --without-tcl was given. if test "${with_tcl+set}" = set; then withval="$with_tcl" TCL_LIB_DIR=$withval fi; -if test -d $TCL_LIB_DIR; then - echo "$as_me:$LINENO: result: using tcl library in $TCL_LIB_DIR" >&5 + if test -d $TCL_LIB_DIR; then + echo "$as_me:$LINENO: result: using tcl library in $TCL_LIB_DIR" >&5 echo "${ECHO_T}using tcl library in $TCL_LIB_DIR" >&6 -else - { { echo "$as_me:$LINENO: error: Unable to find Tcl directory or Tcl package is not tcl-dev" >&5 + else + { { echo "$as_me:$LINENO: error: Unable to find Tcl directory or Tcl package is not tcl-dev" >&5 echo "$as_me: error: Unable to find Tcl directory or Tcl package is not tcl-dev" >&2;} { (exit 1); exit 1; }; } -fi + fi -cd ${TCL_LIB_DIR}/.. -TCL_TOP_DIR=`pwd` -cd "${BUILD_DIR}" + cd ${TCL_LIB_DIR}/.. + TCL_TOP_DIR=`pwd` + cd "${BUILD_DIR}" -#-------------------------------------------------------------------- + #-------------------------------------------------------------------- -file=$TCL_LIB_DIR/tclConfig.sh -. $file -#CC=$TCL_CC -#CXX=$TCL_CXX -SHLIB_CFLAGS=`echo "$TCL_SHLIB_CFLAGS" |sed -e "s|PIC|pic|" -e "s|+Z|+z|"` -SHLIB_LD=$TCL_SHLIB_LD -SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX -DL_LIBS=$TCL_DL_LIBS -#LD_FLAGS=$TCL_LD_FLAGS + file=$TCL_LIB_DIR/tclConfig.sh + . $file + #CC=$TCL_CC + #CXX=$TCL_CXX + SHLIB_CFLAGS=`echo "$TCL_SHLIB_CFLAGS" |sed -e "s|PIC|pic|" -e "s|+Z|+z|"` + SHLIB_LD=$TCL_SHLIB_LD + SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX + DL_LIBS=$TCL_DL_LIBS + #LD_FLAGS=$TCL_LD_FLAGS -TCL_BASE=`echo ${TCL_LIB_SPEC} |sed -e "s|^.*-l||"` -TCL_STUB_BASE=`echo ${TCL_STUB_LIB_SPEC} |sed -e "s|^.*-l||"` + TCL_BASE=`echo ${TCL_LIB_SPEC} |sed -e "s|^.*-l||"` + TCL_STUB_BASE=`echo ${TCL_STUB_LIB_SPEC} |sed -e "s|^.*-l||"` -if test "x${TCL_INC_SPEC}" != "x" ; then - TCL_INC_DIR=$TCL_INC_SPEC -fi + if test "x${TCL_INC_SPEC}" != "x" ; then + TCL_INC_DIR=$TCL_INC_SPEC + fi -if test "x${TCL_INCLUDE_SPEC}" != "x"; then - TCL_INC_DIR=$TCL_INCLUDE_SPEC -fi + if test "x${TCL_INCLUDE_SPEC}" != "x"; then + TCL_INC_DIR=$TCL_INCLUDE_SPEC + fi -if test "x${TCL_INC_DIR}" == "x"; then - TCL_INC_DIR=$TCL_INCLUDE_DIR -fi + if test "x${TCL_INC_DIR}" == "x"; then + TCL_INC_DIR=$TCL_INCLUDE_DIR + fi -if test "x${TCL_INC_DIR}" == "x" -a -f ${TCL_PREFIX}/include/tcl.h; then - TCL_INC_DIR=${TCL_PREFIX}/include -fi + if test "x${TCL_INC_DIR}" == "x" -a -f ${TCL_PREFIX}/include/tcl.h; then + TCL_INC_DIR=${TCL_PREFIX}/include + fi -if test "x${TCL_INC_DIR}" == "x"; then - { { echo "$as_me:$LINENO: error: You dot not have a devel package of Tcl" >&5 + if test "x${TCL_INC_DIR}" == "x"; then + { { echo "$as_me:$LINENO: error: You dot not have a devel package of Tcl" >&5 echo "$as_me: error: You dot not have a devel package of Tcl" >&2;} { (exit 1); exit 1; }; } -fi + fi -case $TCL_INC_DIR in - -I*) ;; - *) TCL_INC_DIR=-I$TCL_INC_DIR;; -esac + case $TCL_INC_DIR in + -I*) ;; + *) TCL_INC_DIR=-I$TCL_INC_DIR;; + esac -TCL_INC_SPEC=$TCL_INC_DIR + TCL_INC_SPEC=$TCL_INC_DIR + framework=`echo "${TCL_BASE}" | grep -- "-framework"` + if test "x${framework}" == "x"; then + TCL_LIB_SPEC="-L${TCL_LIB_DIR} -l${TCL_BASE}" + fi + TCL_STUB_LIB_SPEC="-L${TCL_LIB_DIR} -l${TCL_STUB_BASE}" + eval "TCL_UNSHARED_LIB_FILE=lib${TCL_BASE}${TCL_UNSHARED_LIB_SUFFIX}" + eval "TCL_SHARED_LIB_FILE=lib${TCL_BASE}${TCL_SHARED_LIB_SUFFIX}" + #-------------------------------------------------------------------- + # Read in configuration information generated by TK, and + # arrange for it to be substituted into our Makefile. + #-------------------------------------------------------------------- -framework=`echo "${TCL_BASE}" | grep -- "-framework"` -if test "x${framework}" == "x"; then - TCL_LIB_SPEC="-L${TCL_LIB_DIR} -l${TCL_BASE}" -fi -TCL_STUB_LIB_SPEC="-L${TCL_LIB_DIR} -l${TCL_STUB_BASE}" -eval "TCL_UNSHARED_LIB_FILE=lib${TCL_BASE}${TCL_UNSHARED_LIB_SUFFIX}" -eval "TCL_SHARED_LIB_FILE=lib${TCL_BASE}${TCL_SHARED_LIB_SUFFIX}" - -#-------------------------------------------------------------------- -# Read in configuration information generated by TK, and -# arrange for it to be substituted into our Makefile. -#-------------------------------------------------------------------- - -echo "$as_me:$LINENO: checking tk build dir" >&5 + echo "$as_me:$LINENO: checking tk build dir" >&5 echo $ECHO_N "checking tk build dir... $ECHO_C" >&6 -TK_LIB_DIR=$prefix/lib -if test -f "${TCL_LIB_DIR}/tkConfig.sh"; then - TK_LIB_DIR=$TCL_LIB_DIR -else - TK_LIB_DIR=$prefix/lib - dirs="/usr/lib/tk8.4a* \ - /usr/local/lib/tk8.4a* \ - /usr/lib/tk8.4b* \ - /usr/local/lib/tk8.4b* \ - /usr/lib/tk8.4 \ - /usr/lib/tk8.4.* \ - /usr/local/lib/tk8.4 \ - /usr/local/lib/tk8.4.* \ - /usr/lib/tk8.5 \ - /usr/lib/tk8.5.* \ - /usr/local/lib/tk8.5 \ - /usr/local/lib/tk8.5.* \ - /Library/Frameworks/Tk.framework \ - /Library/Frameworks/Tk.framework/Versions/8.3 \ - /Library/Frameworks/Tk.framework/Versions/8.4 \ - /Library/Frameworks/Tk.framework/Versions/8.5 \ - /usr/local/lib \ - /usr/lib \ - /usr/local/lib64 \ - /usr/lib64 \ - /usr/lib64/tk8.4a* \ - /usr/local/lib64/tk8.4a* \ - /usr/lib64/tk8.4b* \ - /usr/local/lib64/tk8.4b* \ - /usr/lib64/tk8.4 \ - /usr/lib64/tk8.4.* \ - /usr/local/lib64/tk8.4 \ - /usr/local/lib64/tk8.4.* \ - /usr/lib64/tk8.5 \ - /usr/lib64/tk8.5.* \ - /usr/local/lib64/tk8.5 \ - /usr/local/lib64/tk8.5.* \ - `locate tkConfig.sh`" + TK_LIB_DIR=$prefix/lib + if test -f "${TCL_LIB_DIR}/tkConfig.sh"; then + TK_LIB_DIR=$TCL_LIB_DIR + else + TK_LIB_DIR=$prefix/lib + dirs="/usr/lib/tk8.4a* \ + /usr/local/lib/tk8.4a* \ + /usr/lib/tk8.4b* \ + /usr/local/lib/tk8.4b* \ + /usr/lib/tk8.4 \ + /usr/lib/tk8.4.* \ + /usr/local/lib/tk8.4 \ + /usr/local/lib/tk8.4.* \ + /usr/lib/tk8.5 \ + /usr/lib/tk8.5.* \ + /usr/local/lib/tk8.5 \ + /usr/local/lib/tk8.5.* \ + /Library/Frameworks/Tk.framework \ + ~/Library/Frameworks/Tk.framework \ + /Network/Library/Frameworks/Tk.framework \ + /System/Library/Frameworks/Tk.framework \ + /usr/local/lib \ + /usr/lib \ + /usr/local/lib64 \ + /usr/lib64 \ + /usr/lib64/tk8.4a* \ + /usr/local/lib64/tk8.4a* \ + /usr/lib64/tk8.4b* \ + /usr/local/lib64/tk8.4b* \ + /usr/lib64/tk8.4 \ + /usr/lib64/tk8.4.* \ + /usr/local/lib64/tk8.4 \ + /usr/local/lib64/tk8.4.* \ + /usr/lib64/tk8.5 \ + /usr/lib64/tk8.5.* \ + /usr/local/lib64/tk8.5 \ + /usr/local/lib64/tk8.5.* \ + `locate tkConfig.sh`" - for i in $dirs ; do + for i in $dirs ; do - if test -f "$i"; then - i=`dirname $i` - fi + if test -f "$i"; then + i=`dirname $i` + fi - if test -d "$i" -a -f "$i/tkConfig.sh"; then - file=$i/tkConfig.sh - . $file + if test -d "$i" -a -f "$i/tkConfig.sh"; then + file=$i/tkConfig.sh + . $file - if test "x${version_ok}" != "xyes"; then - VERSION=${TK_VERSION} - fi + if test "x${version_ok}" != "xyes"; then + VERSION=${TK_VERSION} + fi - if test "x${TK_INC_DIR}" != "x" -o "x${TK_INC_SPEC}" != "x" \ - -o "x${TK_INCLUDE_DIR}" != "x" -o "x${TK_INCLUDE_SPEC}" != "x"; then - if test "x${TK_VERSION}" == "x${VERSION}"; then - TK_LIB_DIR=`cd $i; pwd` - break; + if test "x${TK_INC_DIR}" != "x" -o "x${TK_INC_SPEC}" != "x" \ + -o "x${TK_INCLUDE_DIR}" != "x" -o "x${TK_INCLUDE_SPEC}" != "x"; then + if test "x${TK_VERSION}" == "x${VERSION}"; then + TK_LIB_DIR=`cd $i; pwd` + break; + fi + elif test -f ${TK_PREFIX}/include/tk.h; then + TK_LIB_DIR=`cd $i; pwd` + break; fi - elif test -f ${TK_PREFIX}/include/tk.h; then - TK_LIB_DIR=`cd $i; pwd` - break; - fi - fi + fi - done + done -fi + fi # Check whether --with-tk or --without-tk was given. if test "${with_tk+set}" = set; then withval="$with_tk" TK_LIB_DIR=$withval fi; -if test -d $TK_LIB_DIR; then - echo "$as_me:$LINENO: result: using tk library in $TK_LIB_DIR" >&5 + if test -d $TK_LIB_DIR; then + echo "$as_me:$LINENO: result: using tk library in $TK_LIB_DIR" >&5 echo "${ECHO_T}using tk library in $TK_LIB_DIR" >&6 -else - { { echo "$as_me:$LINENO: error: Unable to find Tk directory or Tk package is not tk-dev" >&5 + else + { { echo "$as_me:$LINENO: error: Unable to find Tk directory or Tk package is not tk-dev" >&5 echo "$as_me: error: Unable to find Tk directory or Tk package is not tk-dev" >&2;} { (exit 1); exit 1; }; } -fi + fi -cd ${TK_LIB_DIR}/.. -TK_TOP_DIR=`pwd` -cd "${BUILD_DIR}" + cd ${TK_LIB_DIR}/.. + TK_TOP_DIR=`pwd` + cd "${BUILD_DIR}" -file=$TK_LIB_DIR/tkConfig.sh -. $file + file=$TK_LIB_DIR/tkConfig.sh + . $file -if test "x${TK_INC_SPEC}" != "x" ; then - TK_INC_DIR=$TK_INC_SPEC -fi + if test "x${TK_INC_SPEC}" != "x" ; then + TK_INC_DIR=$TK_INC_SPEC + fi -if test "x${TK_INCLUDE_SPEC}" != "x"; then - TK_INC_DIR=$TK_INCLUDE_SPEC -fi + if test "x${TK_INCLUDE_SPEC}" != "x"; then + TK_INC_DIR=$TK_INCLUDE_SPEC + fi -if test "x${TK_INC_DIR}" == "x"; then - TK_INC_DIR=$TK_INCLUDE_DIR -fi + if test "x${TK_INC_DIR}" == "x"; then + TK_INC_DIR=$TK_INCLUDE_DIR + fi -if test "x${TK_INC_DIR}" == "x" -a -f ${TK_PREFIX}/include/tk.h; then - TK_INC_DIR=${TK_PREFIX}/include -fi + if test "x${TK_INC_DIR}" == "x" -a -f ${TK_PREFIX}/include/tk.h; then + TK_INC_DIR=${TK_PREFIX}/include + fi -if test "x${TK_INC_DIR}" == "x"; then - { { echo "$as_me:$LINENO: error: You dot not have a devel package of Tk" >&5 + if test "x${TK_INC_DIR}" == "x"; then + { { echo "$as_me:$LINENO: error: You dot not have a devel package of Tk" >&5 echo "$as_me: error: You dot not have a devel package of Tk" >&2;} { (exit 1); exit 1; }; } + fi + + case $TK_INC_DIR in + -I*) ;; + *) TK_INC_DIR=-I$TK_INC_DIR;; + esac + + TK_INC_SPEC=$TK_INC_DIR fi -case $TK_INC_DIR in - -I*) ;; - *) TK_INC_DIR=-I$TK_INC_DIR;; -esac -TK_INC_SPEC=$TK_INC_DIR @@ -3012,7 +3084,6 @@ - echo "$as_me:$LINENO: checking for main in -lstdc++" >&5 echo $ECHO_N "checking for main in -lstdc++... $ECHO_C" >&6 if test "${ac_cv_lib_stdcpp_main+set}" = set; then @@ -4723,38 +4794,849 @@ -case "`uname -s`" in - Linux) - FOUND_OS="linux" - ;; - OpenBSD | FreeBSD | NetBSD) - # *BSD has important stuff (from ports) - # in /usr/local ... - CFLAGS="$CFLAGS -I/usr/local/include -L/usr/local/lib" - LDFLAGS="$LDFLAGS -L/usr/local/lib" - FOUND_OS="bsd" - ;; - Darwin) - FOUND_OS="mac" - ;; - *) - echo "$as_me:$LINENO: checking if amsn will build on \`uname -s\`" >&5 -echo $ECHO_N "checking if amsn will build on \`uname -s\`... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: maybe" >&5 -echo "${ECHO_T}maybe" >&6 - FOUND_OS="unknown" - ;; +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <string.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +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 <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <ctype.h> +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +echo "$as_me:$LINENO: checking for png_read_info in -lpng" >&5 +echo $ECHO_N "checking for png_read_info in -lpng... $ECHO_C" >&6 +if test "${ac_cv_lib_png_png_read_info+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpng -lz -lm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char png_read_info (); +int +main () +{ +png_read_info (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_png_png_read_info=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_png_png_read_info=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_read_info" >&5 +echo "${ECHO_T}$ac_cv_lib_png_png_read_info" >&6 +if test $ac_cv_lib_png_png_read_info = yes; then + if test "${ac_cv_header_png_h+set}" = set; then + echo "$as_me:$LINENO: checking for png.h" >&5 +echo $ECHO_N "checking for png.h... $ECHO_C" >&6 +if test "${ac_cv_header_png_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5 +echo "${ECHO_T}$ac_cv_header_png_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking png.h usability" >&5 +echo $ECHO_N "checking png.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <png.h> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking png.h presence" >&5 +echo $ECHO_N "checking png.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <png.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: png.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: png.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: png.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: png.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: png.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: png.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: png.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: png.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; esac +echo "$as_me:$LINENO: checking for png.h" >&5 +echo $ECHO_N "checking for png.h... $ECHO_C" >&6 +if test "${ac_cv_header_png_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_png_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5 +echo "${ECHO_T}$ac_cv_header_png_h" >&6 +fi +if test $ac_cv_header_png_h = yes; then + : +else + { { echo "$as_me:$LINENO: error: png headers not found" >&5 +echo "$as_me: error: png headers not found" >&2;} + { (exit 1); exit 1; }; } +fi +else + { { echo "$as_me:$LINENO: error: libpng is required" >&5 +echo "$as_me: error: libpng is required" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: checking for jpeg_CreateDecompress in -ljpeg" >&5 +echo $ECHO_N "checking for jpeg_CreateDecompress in -ljpeg... $ECHO_C" >&6 +if test "${ac_cv_lib_jpeg_jpeg_CreateDecompress+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ljpeg $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char jpeg_CreateDecompress (); +int +main () +{ +jpeg_CreateDecompress (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_jpeg_jpeg_CreateDecompress=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_cv_lib_jpeg_jpeg_CreateDecompress=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5 +echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6 +if test $ac_cv_lib_jpeg_jpeg_CreateDecompress = yes; then + if test "${ac_cv_header_jpeglib_h+set}" = set; then + echo "$as_me:$LINENO: checking for jpeglib.h" >&5 +echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6 +if test "${ac_cv_header_jpeglib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 +echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking jpeglib.h usability" >&5 +echo $ECHO_N "checking jpeglib.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <jpeglib.h> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 +# Is the header present? +echo "$as_me:$LINENO: checking jpeglib.h presence" >&5 +echo $ECHO_N "checking jpeglib.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <jpeglib.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: jpeglib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: jpeglib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: jpeglib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: jpeglib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: jpeglib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: jpeglib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: jpeglib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: jpeglib.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for jpeglib.h" >&5 +echo $ECHO_N "checking for jpeglib.h... $ECHO_C" >&6 +if test "${ac_cv_header_jpeglib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_jpeglib_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_jpeglib_h" >&5 +echo "${ECHO_T}$ac_cv_header_jpeglib_h" >&6 + +fi +if test $ac_cv_header_jpeglib_h = yes; then + if test "${ac_cv_header_jerror_h+set}" = set; then + echo "$as_me:$LINENO: checking for jerror.h" >&5 +echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6 +if test "${ac_cv_header_jerror_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5 +echo "${ECHO_T}$ac_cv_header_jerror_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking jerror.h usability" >&5 +echo $ECHO_N "checking jerror.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <jerror.h> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking jerror.h presence" >&5 +echo $ECHO_N "checking jerror.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <jerror.h> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: jerror.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: jerror.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: jerror.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: jerror.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: jerror.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: jerror.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: jerror.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: jerror.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: jerror.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: jerror.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: jerror.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: jerror.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: jerror.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for jerror.h" >&5 +echo $ECHO_N "checking for jerror.h... $ECHO_C" >&6 +if test "${ac_cv_header_jerror_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_jerror_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_jerror_h" >&5 +echo "${ECHO_T}$ac_cv_header_jerror_h" >&6 + +fi +if test $ac_cv_header_jerror_h = yes; then + : +else + { { echo "$as_me:$LINENO: error: jerror headers not found" >&5 +echo "$as_me: error: jerror headers not found" >&2;} + { (exit 1); exit 1; }; } +fi + + +else + { { echo "$as_me:$LINENO: error: jpeg headers not found" >&5 +echo "$as_me: error: jpeg headers not found" >&2;} + { (exit 1); exit 1; }; } +fi + + +else + { { echo "$as_me:$LINENO: error: libjpeg is required" >&5 +echo "$as_me: error: libjpeg is required" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + for ac_func in ftello fseeko getpt strcasestr memmem dlopen do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` @@ -5655,11 +6537,11 @@ s,@LIBDIR@,$LIBDIR,;t t s,@BUILD_DIR@,$BUILD_DIR,;t t s,@TCL_LIB_DIR@,$TCL_LIB_DIR,;t t -s,@TCL_INC_SPEC@,$TCL_INC_SPEC,;t t s,@TK_VERSION@,$TK_VERSION,;t t s,@TK_LIB@,$TK_LIB,;t t s,@TK_LIBS@,$TK_LIBS,;t t s,@TK_LIB_DIR@,$TK_LIB_DIR,;t t +s,@TCL_INC_SPEC@,$TCL_INC_SPEC,;t t s,@TK_INC_SPEC@,$TK_INC_SPEC,;t t s,@TCL_STUB_LIB_SPEC@,$TCL_STUB_LIB_SPEC,;t t s,@TK_STUB_LIB_SPEC@,$TK_STUB_LIB_SPEC,;t t @@ -5672,6 +6554,7 @@ s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t s,@X_LIBS@,$X_LIBS,;t t s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t +s,@EGREP@,$EGREP,;t t s,@LIBPTHREAD@,$LIBPTHREAD,;t t s,@USE_MMX@,$USE_MMX,;t t s,@LIBOBJS@,$LIBOBJS,;t t Modified: trunk/amsn/configure.ac =================================================================== --- trunk/amsn/configure.ac 2006-07-31 13:39:29 UTC (rev 7095) +++ trunk/amsn/configure.ac 2006-07-31 21:27:23 UTC (rev 7096) @@ -42,6 +42,38 @@ AC_SUBST(CONFIGURE_ARGS) CONFIGURE_ARGS=`echo $@` +dnl Check for OS +#`uname -s` +case "Darwin" in + Linux) + FOUND_OS="linux" + ;; + OpenBSD | FreeBSD | NetBSD) + # *BSD has important stuff (from ports) + # in /usr/local ... + CFLAGS="$CFLAGS -I/usr/local/include -L/usr/local/lib" + LDFLAGS="$LDFLAGS -L/usr/local/lib" + FOUND_OS="bsd" + ;; + Darwin) + FOUND_OS="mac" + CFLAGS="$CFLAGS -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" + CXXFLAGS="$CXXFLAGS -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk" + LDFLAGS="$LDFLAGS -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -Wl,-single_module" + # Directories in which the Tcl core can be found + TCL_INC_SPEC="-I../../Frameworks/Tcl.framework/Headers -DUSE_TCL_STUBS" + TCL_STUB_LIB_SPEC="-L../../Frameworks/Tcl.framework -ltclstub8.4\${TCL_DBGX}" + + # Directories in which the Tk core can be found + TK_INC_SPEC="-I../../Frameworks/Tk.framework/Headers -DUSE_TK_STUBS" + TK_STUB_LIB_SPEC="-L../../Frameworks/Tk.framework -ltkstub8.4\${TK_DBGX}" + ;; + *) + AC_MSG_CHECKING(if amsn will build on `uname -s`) + AC_MSG_RESULT(maybe) + FOUND_OS="unknown" + ;; +esac dnl --------------------------------------------------------------------- dnl Checks for TCL and TK. @@ -90,263 +122,264 @@ AC_SUBST(BUILD_DIR) -#-------------------------------------------------------------------- -# Read in configuration information generated by Tcl for shared -# libraries, and arrange for it to be substituted into our -# Makefile. -#-------------------------------------------------------------------- - -AC_MSG_CHECKING(tcl build dir) -TCL_LIB_DIR=$exec_prefix/lib -dirs=" /usr/lib/tcl8.4a* \ - /usr/local/lib/tcl8.4a* \ - /usr/lib/tcl8.4b* \ - /usr/local/lib/tcl8.4b* \ - /usr/lib/tcl8.4 \ - /usr/lib/tcl8.4.* \ - /usr/local/lib/tcl8.4 \ - /usr/local/lib/tcl8.4.* \ - /usr/lib/tcl8.5 \ - /usr/lib/tcl8.5.* \ - /usr/local/lib/tcl8.5 \ - /usr/local/lib/tcl8.5.* \ - /Library/Frameworks/Tcl.framework \ - /Library/Frameworks/Tcl.framework/Versions/8.3 \ - /Library/Frameworks/Tcl.framework/Versions/8.4 \ - /Library/Frameworks/Tcl.framework/Versions/8.5 \ - /usr/local/lib \ - /usr/lib \ - /usr/local/lib64 \ - /usr/lib64 \ - /usr/lib64/tcl8.4a* \ - /usr/local/lib64/tcl8.4a* \ - /usr/lib64/tcl8.4b* \ - /usr/local/lib64/tcl8.4b* \ - /usr/lib64/tcl8.4 \ - /usr/lib64/tcl8.4.* \ - /usr/local/lib64/tcl8.4 \ - /usr/local/lib64/tcl8.4.* \ - /usr/lib64/tcl8.5 \ - /usr/lib64/tcl8.5.* \ - /usr/local/lib64/tcl8.5 \ - /usr/local/lib64/tcl8.5.* \ - `locate tclConfig.sh`" - -for i in $dirs ; do - - if test -f "$i"; then - i=`dirname $i` - fi - - if test -d "$i" -a -f "$i/tclConfig.sh"; then - file=$i/tclConfig.sh +if test $FOUND_OS != "mac"; then + #-------------------------------------------------------------------- + # Read in configuration information generated by Tcl for shared + # libraries, and arrange for it to be substituted into our + # Makefile. + #-------------------------------------------------------------------- + + AC_MSG_CHECKING(tcl build dir) + TCL_LIB_DIR=$exec_prefix/lib + dirs=" /usr/lib/tcl8.4a* \ + /usr/local/lib/tcl8.4a* \ + /usr/lib/tcl8.4b* \ + /usr/local/lib/tcl8.4b* \ + /usr/lib/tcl8.4 \ + /usr/lib/tcl8.4.* \ + /usr/local/lib/tcl8.4 \ + /usr/local/lib/tcl8.4.* \ + /usr/lib/tcl8.5 \ + /usr/lib/tcl8.5.* \ + /usr/local/lib/tcl8.5 \ + /usr/local/lib/tcl8.5.* \ + /Library/Frameworks/Tcl.framework \ + ~/Library/Frameworks/Tcl.framework \ + /Network/Library/Frameworks/Tcl.framework \ + /System/Library/Frameworks/Tcl.framework \ + /usr/local/lib \ + /usr/lib \ + /usr/local/lib64 \ + /usr/lib64 \ + /usr/lib64/tcl8.4a* \ + /usr/local/lib64/tcl8.4a* \ + /usr/lib64/tcl8.4b* \ + /usr/local/lib64/tcl8.4b* \ + /usr/lib64/tcl8.4 \ + /usr/lib64/tcl8.4.* \ + /usr/local/lib64/tcl8.4 \ + /usr/local/lib64/tcl8.4.* \ + /usr/lib64/tcl8.5 \ + /usr/lib64/tcl8.5.* \ + /usr/local/lib64/tcl8.5 \ + /usr/local/lib64/tcl8.5.* \ + `locate tclConfig.sh`" + + for i in $dirs ; do + + if test -f "$i"; then + i=`dirname $i` + fi + + if test -d "$i" -a -f "$i/tclConfig.sh"; then + file=$i/tclConfig.sh + . $file + + if test "x${version_ok}" != "xyes"; then + VERSION=${TCL_VERSION} + fi + + if test "x${TCL_INC_DIR}" != "x" -o "x${TCL_INC_SPEC}" != "x" \ + -o "x${TCL_INCLUDE_DIR}" != "x" -o "x${TCL_INCLUDE_SPEC}" != "x"; then + if test "x${TCL_VERSION}" == "x${VERSION}" ; then + TCL_LIB_DIR=`cd $i; pwd` + break; + fi + elif test -f ${TCL_PREFIX}/include/tcl.h; then + TCL_LIB_DIR=`cd $i; pwd` + break; + fi + + fi + + done + AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl binaries from DIR], TCL_LIB_DIR=$withval,) + if test -d $TCL_LIB_DIR; then + AC_MSG_RESULT([using tcl library in $TCL_LIB_DIR]) + else + AC_MSG_ERROR(Unable to find Tcl directory or Tcl package is not tcl-dev) + fi + + cd ${TCL_LIB_DIR}/.. + TCL_TOP_DIR=`pwd` + cd "${BUILD_DIR}" + + #-------------------------------------------------------------------- + + file=$TCL_LIB_DIR/tclConfig.sh . $file - - if test "x${version_ok}" != "xyes"; then - VERSION=${TCL_VERSION} + #CC=$TCL_CC + #CXX=$TCL_CXX + SHLIB_CFLAGS=`echo "$TCL_SHLIB_CFLAGS" |sed -e "s|PIC|pic|" -e "s|+Z|+z|"` + SHLIB_LD=$TCL_SHLIB_LD + SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX + DL_LIBS=$TCL_DL_LIBS + #LD_FLAGS=$TCL_LD_FLAGS + + TCL_BASE=`echo ${TCL_LIB_SPEC} |sed -e "s|^.*-l||"` + TCL_STUB_BASE=`echo ${TCL_STUB_LIB_SPEC} |sed -e "s|^.*-l||"` + + AC_SUBST(TCL_LIB_DIR) + + if test "x${TCL_INC_SPEC}" != "x" ; then + TCL_INC_DIR=$TCL_INC_SPEC fi - - if test "x${TCL_INC_DIR}" != "x" -o "x${TCL_INC_SPEC}" != "x" \ - -o "x${TCL_INCLUDE_DIR}" != "x" -o "x${TCL_INCLUDE_SPEC}" != "x"; then - if test "x${TCL_VERSION}" == "x${VERSION}" ; then - TCL_LIB_DIR=`cd $i; pwd` - break; - fi - elif test -f ${TCL_PREFIX}/include/tcl.h; then - TCL_LIB_DIR=`cd $i; pwd` - break; + + + if test "x${TCL_INCLUDE_SPEC}" != "x"; then + TCL_INC_DIR=$TCL_INCLUDE_SPEC fi - - fi - -done -AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl binaries from DIR], TCL_LIB_DIR=$withval,) -if test -d $TCL_LIB_DIR; then - AC_MSG_RESULT([using tcl library in $TCL_LIB_DIR]) -else - AC_MSG_ERROR(Unable to find Tcl directory or Tcl package is not tcl-dev) -fi - -cd ${TCL_LIB_DIR}/.. -TCL_TOP_DIR=`pwd` -cd "${BUILD_DIR}" - -#-------------------------------------------------------------------- - -file=$TCL_LIB_DIR/tclConfig.sh -. $file -#CC=$TCL_CC -#CXX=$TCL_CXX -SHLIB_CFLAGS=`echo "$TCL_SHLIB_CFLAGS" |sed -e "s|PIC|pic|" -e "s|+Z|+z|"` -SHLIB_LD=$TCL_SHLIB_LD -SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX -DL_LIBS=$TCL_DL_LIBS -#LD_FLAGS=$TCL_LD_FLAGS - -TCL_BASE=`echo ${TCL_LIB_SPEC} |sed -e "s|^.*-l||"` -TCL_STUB_BASE=`echo ${TCL_STUB_LIB_SPEC} |sed -e "s|^.*-l||"` - -AC_SUBST(TCL_LIB_DIR) - -if test "x${TCL_INC_SPEC}" != "x" ; then - TCL_INC_DIR=$TCL_INC_SPEC -fi - - -if test "x${TCL_INCLUDE_SPEC}" != "x"; then - TCL_INC_DIR=$TCL_INCLUDE_SPEC -fi - -if test "x${TCL_INC_DIR}" == "x"; then - TCL_INC_DIR=$TCL_INCLUDE_DIR -fi - -if test "x${TCL_INC_DIR}" == "x" -a -f ${TCL_PREFIX}/include/tcl.h; then - TCL_INC_DIR=${TCL_PREFIX}/include -fi - -if test "x${TCL_INC_DIR}" == "x"; then - AC_MSG_ERROR(You dot not have a devel package of Tcl) -fi - -case $TCL_INC_DIR in - -I*) ;; - *) TCL_INC_DIR=-I$TCL_INC_DIR;; -esac - -TCL_INC_SPEC=$TCL_INC_DIR - -AC_SUBST(TCL_INC_SPEC) - -framework=`echo "${TCL_BASE}" | grep -- "-framework"` -if test "x${framework}" == "x"; then - TCL_LIB_SPEC="-L${TCL_LIB_DIR} -l${TCL_BASE}" -fi -TCL_STUB_LIB_SPEC="-L${TCL_LIB_DIR} -l${TCL_STUB_BASE}" -eval "TCL_UNSHARED_LIB_FILE=lib${TCL_BASE}${TCL_UNSHARED_LIB_SUFFIX}" -eval "TCL_SHARED_LIB_FILE=lib${TCL_BASE}${TCL_SHARED_LIB_SUFFIX}" - -#-------------------------------------------------------------------- -# Read in configuration information generated by TK, and -# arrange for it to be substituted into our Makefile. -#-------------------------------------------------------------------- - -AC_MSG_CHECKING(tk build dir) -TK_LIB_DIR=$prefix/lib -if test -f "${TCL_LIB_DIR}/tkConfig.sh"; then - TK_LIB_DIR=$TCL_LIB_DIR -else - TK_LIB_DIR=$prefix/lib - dirs="/usr/lib/tk8.4a* \ - /usr/local/lib/tk8.4a* \ - /usr/lib/tk8.4b* \ - /usr/local/lib/tk8.4b* \ - /usr/lib/tk8.4 \ - /usr/lib/tk8.4.* \ - /usr/local/lib/tk8.4 \ - /usr/local/lib/tk8.4.* \ - /usr/lib/tk8.5 \ - /usr/lib/tk8.5.* \ - /usr/local/lib/tk8.5 \ - /usr/local/lib/tk8.5.* \ - /Library/Frameworks/Tk.framework \ - /Library/Frameworks/Tk.framework/Versions/8.3 \ - /Library/Frameworks/Tk.framework/Versions/8.4 \ - /Library/Frameworks/Tk.framework/Versions/8.5 \ - /usr/local/lib \ - /usr/lib \ - /usr/local/lib64 \ - /usr/lib64 \ - /usr/lib64/tk8.4a* \ - /usr/local/lib64/tk8.4a* \ - /usr/lib64/tk8.4b* \ - /usr/local/lib64/tk8.4b* \ - /usr/lib64/tk8.4 \ - /usr/lib64/tk8.4.* \ - /usr/local/lib64/tk8.4 \ - /usr/local/lib64/tk8.4.* \ - /usr/lib64/tk8.5 \ - /usr/lib64/tk8.5.* \ - /usr/local/lib64/tk8.5 \ - /usr/local/lib64/tk8.5.* \ - `locate tkConfig.sh`" - - - for i in $dirs ; do - - if test -f "$i"; then - i=`dirname $i` + + if test "x${TCL_INC_DIR}" == "x"; then + TCL_INC_DIR=$TCL_INCLUDE_DIR fi - - if test -d "$i" -a -f "$i/tkConfig.sh"; then - file=$i/tkConfig.sh - . $file - - if test "x${version_ok}" != "xyes"; then - VERSION=${TK_VERSION} - fi - - if test "x${TK_INC_DIR}" != "x" -o "x${TK_INC_SPEC}" != "x" \ - -o "x${TK_INCLUDE_DIR}" != "x" -o "x${TK_INCLUDE_SPEC}" != "x"; then - if test "x${TK_VERSION}" == "x${VERSION}"; then - TK_LIB_DIR=`cd $i; pwd` - break; + + if test "x${TCL_INC_DIR}" == "x" -a -f ${TCL_PREFIX}/include/tcl.h; then + TCL_INC_DIR=${TCL_PREFIX}/include + fi + + if test "x${TCL_INC_DIR}" == "x"; then + AC_MSG_ERROR(You dot not have a devel package of Tcl) + fi + + case $TCL_INC_DIR in + -I*) ;; + *) TCL_INC_DIR=-I$TCL_INC_DIR;; + esac + + TCL_INC_SPEC=$TCL_INC_DIR + + framework=`echo "${TCL_BASE}" | grep -- "-framework"` + if test "x${framework}" == "x"; then + TCL_LIB_SPEC="-L${TCL_LIB_DIR} -l${TCL_BASE}" + fi + TCL_STUB_LIB_SPEC="-L${TCL_LIB_DIR} -l${TCL_STUB_BASE}" + eval "TCL_UNSHARED_LIB_FILE=lib${TCL_BASE}${TCL_UNSHARED_LIB_SUFFIX}" + eval "TCL_SHARED_LIB_FILE=lib${TCL_BASE}${TCL_SHARED_LIB_SUFFIX}" + + #-------------------------------------------------------------------- + # Read in configuration information generated by TK, and + # arrange for it to be substituted into our Makefile. + #-------------------------------------------------------------------- + + AC_MSG_CHECKING(tk build dir) + TK_LIB_DIR=$prefix/lib + if test -f "${TCL_LIB_DIR}/tkConfig.sh"; then + TK_LIB_DIR=$TCL_LIB_DIR + else + TK_LIB_DIR=$prefix/lib + dirs="/usr/lib/tk8.4a* \ + /usr/local/lib/tk8.4a* \ + /usr/lib/tk8.4b* \ + /usr/local/lib/tk8.4b* \ + /usr/lib/tk8.4 \ + /usr/lib/tk8.4.* \ + /usr/local/lib/tk8.4 \ + /usr/local/lib/tk8.4.* \ + /usr/lib/tk8.5 \ + /usr/lib/tk8.5.* \ + /usr/local/lib/tk8.5 \ + /usr/local/lib/tk8.5.* \ + /Library/Frameworks/Tk.framework \ + ~/Library/Frameworks/Tk.framework \ + /Network/Library/Frameworks/Tk.framework \ + /System/Library/Frameworks/Tk.framework \ + /usr/local/lib \ + /usr/lib \ + /usr/local/lib64 \ + /usr/lib64 \ + /usr/lib64/tk8.4a* \ + /usr/local/lib64/tk8.4a* \ + /usr/lib64/tk8.4b* \ + /usr/local/lib64/tk8.4b* \ + /usr/lib64/tk8.4 \ + /usr/lib64/tk8.4.* \ + /usr/local/lib64/tk8.4 \ + /usr/local/lib64/tk8.4.* \ + /usr/lib64/tk8.5 \ + /usr/lib64/tk8.5.* \ + /usr/local/lib64/tk8.5 \ + /usr/local/lib64/tk8.5.* \ + `locate tkConfig.sh`" + + + for i in $dirs ; do + + if test -f "$i"; then + i=`dirname $i` fi - elif test -f ${TK_PREFIX}/include/tk.h; then - TK_LIB_DIR=`cd $i; pwd` - break; - fi + + if test -d "$i" -a -f "$i/tkConfig.sh"; then + file=$i/tkConfig.sh + . $file + + if test "x${version_ok}" != "xyes"; then + VERSION=${TK_VERSION} + fi + + if test "x${TK_INC_DIR}" != "x" -o "x${TK_INC_SPEC}" != "x" \ + -o "x${TK_INCLUDE_DIR}" != "x" -o "x${TK_INCLUDE_SPEC}" != "x"; then + if test "x${TK_VERSION}" == "x${VERSION}"; then + TK_LIB_DIR=`cd $i; pwd` + break; + fi + elif test -f ${TK_PREFIX}/include/tk.h; then + TK_LIB_DIR=`cd $i; pwd` + break; + fi + fi + + done + fi - - done - + AC_ARG_WITH(tk, [ --with-tk=DIR use Tk binaries from DIR], TK_LIB_DIR=$withval,) + if test -d ... [truncated message content] |