# This file is an input file used by the GNU "autoconf" program to # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. # # RCS: @(#) $Id: configure.in,v 1.16.2.4 2000/07/28 08:12:06 mo Exp $ AC_INIT(../generic/tk.h) TK_VERSION=8.3 TK_MAJOR_VERSION=8 TK_MINOR_VERSION=3 TK_PATCH_LEVEL=".2" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #-------------------------------------------------------------------- # Check whether --enable-gcc or --disable-gcc was given. Do this # before AC_PROG_CC and AC_CYGWIN are called so the compiler can # be fully tested by built-in autoconf tools. #-------------------------------------------------------------------- SC_ENABLE_GCC #-------------------------------------------------------------------- # Checks to see if the make progeam sets the $MAKE variable. #-------------------------------------------------------------------- AC_PROG_MAKE_SET #-------------------------------------------------------------------- # These two macros perform additinal compiler test. #-------------------------------------------------------------------- AC_CYGWIN #-------------------------------------------------------------------- # Determines the correct binary file extension (.o, .obj, .exe etc.) #-------------------------------------------------------------------- AC_OBJEXT AC_EXEEXT #-------------------------------------------------------------------- # Check whether --enable-threads or --disable-threads was given. #-------------------------------------------------------------------- SC_ENABLE_THREADS #-------------------------------------------------------------------- # The statements below define a collection of symbols related to # building libtk as a shared library instead of a static library. #-------------------------------------------------------------------- SC_ENABLE_SHARED #-------------------------------------------------------------------- # The statements below define a collection of compile flags. This # macro depends on the value of SHARED_BUILD, and should be called # after SC_ENABLE_SHARED checks the configure switches. #-------------------------------------------------------------------- SC_CONFIG_CFLAGS #-------------------------------------------------------------------- # man2tcl needs this so that it can use errno.h #-------------------------------------------------------------------- AC_CHECK_HEADER(errno.h, , MAN2TCLFLAGS="-DNO_ERRNO_H") AC_SUBST(MAN2TCLFLAGS) #-------------------------------------------------------------------- # Set the default compiler switches based on the --enable-symbols # option. This macro depends on C flags, and should be called # after SC_CONFIG_CFLAGS macro is called. #-------------------------------------------------------------------- SC_ENABLE_SYMBOLS CFLAGS=${CFLAGS_DEFAULT} LDFLAGS=${LDFLAGS_DEFAULT} TK_DBGX=${DBGX} #-------------------------------------------------------------------- # Locate and source the tclConfig.sh file. #-------------------------------------------------------------------- SC_PATH_TCLCONFIG($TK_PATCH_LEVEL) SC_LOAD_TCLCONFIG SC_PROG_TCLSH #------------------------------------------------------------------------ # tkConfig.sh refers to this by a different name #------------------------------------------------------------------------ TK_SHARED_BUILD=${SHARED_BUILD} #-------------------------------------------------------------------- # Perform final evaluations of variables with possible substitutions. #-------------------------------------------------------------------- TK_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}" TK_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}" TK_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}" eval "TK_SRC_DIR=`cd $srcdir/..; pwd`" eval "TK_DLL_FILE=tk$VER${DLLSUFFIX}" eval "TK_LIB_FILE=${LIBPREFIX}tk$VER${LIBSUFFIX}" eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" # FIXME: All of this var junk needs to be done in tcl.m4 !!!! # I left out the other vars that also need to get defined here. # we also need to double check about including DBGX in lib names # and spaces in file or directory names for the eval eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${TCL_DBGX}\"" eval "TK_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TK_STUB_LIB_FLAG}\"" eval "TCL_DLL_FILE=\"tcl$VER${DLLSUFFIX}\"" eval "TCL_LIB_FILE=\"${LIBPREFIX}tcl$VER${LIBSUFFIX}\"" eval "TCL_STUB_LIB_FILE=\"${LIBPREFIX}tclstub${VER}${LIBSUFFIX}\"" eval "TCL_STUB_LIB_FLAG=\"-ltclstub${VER}${TCL_DBGX}\"" eval "TCL_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TCL_STUB_LIB_FLAG}\"" eval "DLLSUFFIX=${DLLSUFFIX}" eval "LIBPREFIX=${LIBPREFIX}" eval "LIBSUFFIX=${LIBSUFFIX}" eval "EXESUFFIX=${EXESUFFIX}" if test "$SHARED_BUILD" = 0 -o $TCL_NEEDS_EXP_FILE = 0; then TK_BUILD_LIB_SPEC="`pwd`/${TK_LIB_FILE}" TK_LIB_SPEC="${exec_prefix}/lib/${TK_LIB_FILE}" WISH_RES=wish_static.${RES} TK_RES= else TK_BUILD_LIB_SPEC="`pwd`/${TK_DLL_FILE}" TK_LIB_SPEC="${exec_prefix}/lib/${TK_DLL_FILE}" WISH_RES=wish_static.${RES} TK_RES=tk_dll.${RES} fi TK_SHARED_BUILD=${SHARED_BUILD} CFG_TK_SHARED_LIB_SUFFIX=${TK_SHARED_LIB_SUFFIX} CFG_TK_UNSHARED_LIB_SUFFIX=${TK_UNSHARED_LIB_SUFFIX} CFG_TK_EXPORT_FILE_SUFFIX=${TK_EXPORT_FILE_SUFFIX} AC_SUBST(TK_VERSION) AC_SUBST(TK_MAJOR_VERSION) AC_SUBST(TK_MINOR_VERSION) AC_SUBST(TK_PATCH_LEVEL) AC_SUBST(TK_DBGX) AC_SUBST(TK_LIB_FILE) AC_SUBST(TK_DLL_FILE) AC_SUBST(TK_STUB_LIB_FILE) AC_SUBST(TK_STUB_LIB_FLAG) AC_SUBST(TK_BUILD_STUB_LIB_SPEC) AC_SUBST(TK_SRC_DIR) AC_SUBST(TK_BIN_DIR) AC_SUBST(TK_BUILD_LIB_SPEC) AC_SUBST(TK_LIB_SPEC) AC_SUBST(TK_SHARED_BUILD) AC_SUBST(WISH_RES) AC_SUBST(TK_RES) AC_SUBST(TCL_VERSION) AC_SUBST(TCL_MAJOR_VERSION) AC_SUBST(TCL_MINOR_VERSION) AC_SUBST(TCL_PATCH_LEVEL) AC_SUBST(TCL_LIB_FILE) AC_SUBST(TCL_DLL_FILE) AC_SUBST(TCL_STUB_LIB_FILE) AC_SUBST(TCL_STUB_LIB_FLAG) AC_SUBST(TCL_BUILD_STUB_LIB_SPEC) AC_SUBST(TCL_SRC_DIR) AC_SUBST(TCL_BIN_DIR) AC_SUBST(TCL_DBGX) AC_SUBST(CFG_TK_SHARED_LIB_SUFFIX) AC_SUBST(CFG_TK_UNSHARED_LIB_SUFFIX) AC_SUBST(CFG_TK_EXPORT_FILE_SUFFIX) AC_SUBST(TK_SHARED_BUILD) AC_SUBST(PATHTYPE) AC_SUBST(CYGPATH) AC_SUBST(VPSEP) AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(CFLAGS_WARNING) AC_SUBST(EXTRA_CFLAGS) AC_SUBST(STLIB_LD) AC_SUBST(SHLIB_LD) AC_SUBST(SHLIB_LD_LIBS) AC_SUBST(SHLIB_CFLAGS) AC_SUBST(SHLIB_SUFFIX) AC_SUBST(CC_OBJNAME) AC_SUBST(CC_EXENAME) AC_SUBST(LDFLAGS) AC_SUBST(LDFLAGS_DEBUG) AC_SUBST(LDFLAGS_OPTIMIZE) AC_SUBST(LDFLAGS_CONSOLE) AC_SUBST(LDFLAGS_WINDOW) AC_SUBST(AR) AC_SUBST(RANLIB) AC_SUBST(RC) AC_SUBST(RC_OUT) AC_SUBST(RC_TYPE) AC_SUBST(RC_INCLUDE) AC_SUBST(RES) AC_SUBST(LIBS) AC_SUBST(LIBS_GUI) AC_SUBST(DLLSUFFIX) AC_SUBST(LIBPREFIX) AC_SUBST(LIBSUFFIX) AC_SUBST(EXESUFFIX) AC_SUBST(LIBRARIES) AC_SUBST(MAKE_LIB) AC_SUBST(POST_MAKE_LIB) AC_SUBST(MAKE_DLL) AC_SUBST(MAKE_EXE) AC_SUBST(TK_XINCLUDES) AC_SUBST(XINCLUDES) AC_OUTPUT(Makefile tkConfig.sh)