os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/win/configure.in
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/win/configure.in	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,455 @@
     1.4 +#! /bin/bash -norc
     1.5 +# This file is an input file used by the GNU "autoconf" program to
     1.6 +# generate the file "configure", which is run during Tcl installation
     1.7 +# to configure the system for the local environment.
     1.8 +#
     1.9 +# RCS: @(#) $Id: configure.in,v 1.68.2.19 2006/10/23 17:53:28 dgp Exp $
    1.10 +
    1.11 +AC_INIT(../generic/tcl.h)
    1.12 +AC_PREREQ(2.13)
    1.13 +
    1.14 +TCL_VERSION=8.4
    1.15 +TCL_MAJOR_VERSION=8
    1.16 +TCL_MINOR_VERSION=4
    1.17 +TCL_PATCH_LEVEL=".15"
    1.18 +VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
    1.19 +
    1.20 +TCL_DDE_VERSION=1.2
    1.21 +TCL_DDE_MAJOR_VERSION=1
    1.22 +TCL_DDE_MINOR_VERSION=2
    1.23 +DDEVER=$TCL_DDE_MAJOR_VERSION$TCL_DDE_MINOR_VERSION
    1.24 +
    1.25 +TCL_REG_VERSION=1.1
    1.26 +TCL_REG_MAJOR_VERSION=1
    1.27 +TCL_REG_MINOR_VERSION=1
    1.28 +REGVER=$TCL_REG_MAJOR_VERSION$TCL_REG_MINOR_VERSION
    1.29 +
    1.30 +#------------------------------------------------------------------------
    1.31 +# Handle the --prefix=... option
    1.32 +#------------------------------------------------------------------------
    1.33 +
    1.34 +if test "${prefix}" = "NONE"; then
    1.35 +    prefix=/usr/local
    1.36 +fi
    1.37 +if test "${exec_prefix}" = "NONE"; then
    1.38 +    exec_prefix=$prefix
    1.39 +fi
    1.40 +# libdir must be a fully qualified path (not ${exec_prefix}/lib)
    1.41 +eval libdir="$libdir"
    1.42 +
    1.43 +#------------------------------------------------------------------------
    1.44 +# Standard compiler checks
    1.45 +#------------------------------------------------------------------------
    1.46 +
    1.47 +# If the user did not set CFLAGS, set it now to keep
    1.48 +# the AC_PROG_CC macro from adding "-g -O2".
    1.49 +if test "${CFLAGS+set}" != "set" ; then
    1.50 +    CFLAGS=""
    1.51 +fi
    1.52 +
    1.53 +AC_PROG_CC
    1.54 +
    1.55 +# To properly support cross-compilation, one would
    1.56 +# need to use these tool checks instead of
    1.57 +# the ones below and reconfigure with
    1.58 +# autoconf 2.50. You can also just set
    1.59 +# the CC, AR, RANLIB, and RC environment
    1.60 +# variables if you want to cross compile.
    1.61 +dnl AC_CHECK_TOOL(AR, ar)
    1.62 +dnl AC_CHECK_TOOL(RANLIB, ranlib)
    1.63 +dnl AC_CHECK_TOOL(RC, windres)
    1.64 +
    1.65 +if test "${GCC}" = "yes" ; then
    1.66 +    AC_CHECK_PROG(AR, ar, ar)
    1.67 +    AC_CHECK_PROG(RANLIB, ranlib, ranlib)
    1.68 +    AC_CHECK_PROG(RC, windres, windres)
    1.69 +
    1.70 +    if test "${AR}" = "" ; then
    1.71 +	AC_MSG_ERROR([Required archive tool 'ar' not found on PATH.])
    1.72 +    fi
    1.73 +    if test "${RANLIB}" = "" ; then
    1.74 +	AC_MSG_ERROR([Required archive index tool 'ranlib' not found on PATH.])
    1.75 +    fi
    1.76 +    if test "${RC}" = "" ; then
    1.77 +	AC_MSG_ERROR([Required resource tool 'windres' not found on PATH.])
    1.78 +    fi
    1.79 +fi
    1.80 +
    1.81 +#--------------------------------------------------------------------
    1.82 +# Checks to see if the make progeam sets the $MAKE variable.
    1.83 +#--------------------------------------------------------------------
    1.84 +
    1.85 +AC_PROG_MAKE_SET
    1.86 +
    1.87 +#--------------------------------------------------------------------
    1.88 +# Perform additinal compiler tests.
    1.89 +#--------------------------------------------------------------------
    1.90 +
    1.91 +AC_CYGWIN
    1.92 +
    1.93 +if test "$ac_cv_cygwin" = "yes" ; then
    1.94 +    AC_MSG_ERROR([Compiling under Cygwin is not currently supported.
    1.95 +A maintainer for the Cygwin port of Tcl/Tk is needed. See the README
    1.96 +file for information about building with Mingw.])
    1.97 +fi
    1.98 +
    1.99 +
   1.100 +AC_CACHE_CHECK(for SEH support in compiler,
   1.101 +    tcl_cv_seh,
   1.102 +AC_TRY_RUN([
   1.103 +#define WIN32_LEAN_AND_MEAN
   1.104 +#include <windows.h>
   1.105 +#undef WIN32_LEAN_AND_MEAN
   1.106 +
   1.107 +int main(int argc, char** argv) {
   1.108 +    int a, b = 0;
   1.109 +    __try {
   1.110 +        a = 666 / b;
   1.111 +    }
   1.112 +    __except (EXCEPTION_EXECUTE_HANDLER) {
   1.113 +        return 0;
   1.114 +    }
   1.115 +    return 1;
   1.116 +}
   1.117 +],
   1.118 +        tcl_cv_seh=yes,
   1.119 +        tcl_cv_seh=no,
   1.120 +        tcl_cv_seh=no)
   1.121 +)
   1.122 +if test "$tcl_cv_seh" = "no" ; then
   1.123 +    AC_DEFINE(HAVE_NO_SEH, 1,
   1.124 +            [Defined when mingw does not support SEH])
   1.125 +fi
   1.126 +
   1.127 +#
   1.128 +# Check to see if the excpt.h include file provided contains the
   1.129 +# definition for EXCEPTION_DISPOSITION; if not, which is the case
   1.130 +# with Cygwin's version as of 2002-04-10, define it to be int, 
   1.131 +# sufficient for getting the current code to work.
   1.132 +#
   1.133 +AC_CACHE_CHECK(for EXCEPTION_DISPOSITION support in include files,
   1.134 +    tcl_cv_eh_disposition,
   1.135 +AC_TRY_COMPILE([
   1.136 +#define WIN32_LEAN_AND_MEAN
   1.137 +#include <windows.h>
   1.138 +#undef WIN32_LEAN_AND_MEAN
   1.139 +],
   1.140 +[
   1.141 +  EXCEPTION_DISPOSITION x;
   1.142 +],
   1.143 +        tcl_cv_eh_disposition=yes,
   1.144 +        tcl_cv_eh_disposition=no)
   1.145 +)
   1.146 +if test "$tcl_cv_eh_disposition" = "no" ; then
   1.147 +    AC_DEFINE(EXCEPTION_DISPOSITION, int,
   1.148 +            [Defined when cygwin/mingw does not support EXCEPTION DISPOSITION])
   1.149 +fi
   1.150 +
   1.151 +
   1.152 +# Check to see if the winsock2.h include file provided contains
   1.153 +# typedefs like LPFN_ACCEPT and friends.
   1.154 +#
   1.155 +AC_CACHE_CHECK(for LPFN_ACCEPT support in winsock2.h,
   1.156 +    tcl_cv_lpfn_decls,
   1.157 +AC_TRY_COMPILE([
   1.158 +#define WIN32_LEAN_AND_MEAN
   1.159 +#include <windows.h>
   1.160 +#undef WIN32_LEAN_AND_MEAN
   1.161 +#include <winsock2.h>
   1.162 +],
   1.163 +[
   1.164 +  LPFN_ACCEPT accept;
   1.165 +],
   1.166 +        tcl_cv_lpfn_decls=yes,
   1.167 +        tcl_cv_lpfn_decls=no)
   1.168 +)
   1.169 +if test "$tcl_cv_lpfn_decls" = "no" ; then
   1.170 +    AC_DEFINE(HAVE_NO_LPFN_DECLS, 1,
   1.171 +            [Defined when cygwin/mingw does not support LPFN_ACCEPT and friends.])
   1.172 +fi
   1.173 +
   1.174 +# Check to see if winnt.h defines CHAR, SHORT, and LONG
   1.175 +# even if VOID has already been #defined. The win32api
   1.176 +# used by mingw and cygwin is known to do this.
   1.177 +
   1.178 +AC_CACHE_CHECK(for winnt.h that ignores VOID define,
   1.179 +    tcl_cv_winnt_ignore_void,
   1.180 +AC_TRY_COMPILE([
   1.181 +#define VOID void
   1.182 +#define WIN32_LEAN_AND_MEAN
   1.183 +#include <windows.h>
   1.184 +#undef WIN32_LEAN_AND_MEAN
   1.185 +],
   1.186 +[
   1.187 +  CHAR c;
   1.188 +  SHORT s;
   1.189 +  LONG l;
   1.190 +],
   1.191 +        tcl_cv_winnt_ignore_void=yes,
   1.192 +        tcl_cv_winnt_ignore_void=no)
   1.193 +)
   1.194 +if test "$tcl_cv_winnt_ignore_void" = "yes" ; then
   1.195 +    AC_DEFINE(HAVE_WINNT_IGNORE_VOID, 1,
   1.196 +            [Defined when cygwin/mingw ignores VOID define in winnt.h])
   1.197 +fi
   1.198 +
   1.199 +# Check to see if malloc.h is missing the alloca function
   1.200 +# declaration. This is known to be a problem with Mingw.
   1.201 +# If we compiled without the function declaration, it
   1.202 +# would work but we would get a warning message from gcc.
   1.203 +# If we add the function declaration ourselves, it
   1.204 +# would not compile correctly because the _alloca
   1.205 +# function expects the argument to be passed in a
   1.206 +# register and not on the stack. Instead, we just
   1.207 +# call it from inline asm code.
   1.208 +
   1.209 +AC_CACHE_CHECK(for alloca declaration in malloc.h,
   1.210 +    tcl_cv_malloc_decl_alloca,
   1.211 +AC_TRY_COMPILE([
   1.212 +#include <malloc.h>
   1.213 +],
   1.214 +[
   1.215 +  size_t arg = 0;
   1.216 +  void* ptr;
   1.217 +  ptr = alloca;
   1.218 +  ptr = alloca(arg);
   1.219 +],
   1.220 +        tcl_cv_malloc_decl_alloca=yes,
   1.221 +        tcl_cv_malloc_decl_alloca=no)
   1.222 +)
   1.223 +if test "$tcl_cv_malloc_decl_alloca" = "no" &&
   1.224 +   test "${GCC}" = "yes" ; then
   1.225 +    AC_DEFINE(HAVE_ALLOCA_GCC_INLINE, 1,
   1.226 +            [Defined when gcc should use inline ASM to call alloca.])
   1.227 +fi
   1.228 +
   1.229 +# See if the compiler supports casting to a union type.
   1.230 +# This is used to stop gcc from printing a compiler
   1.231 +# warning when initializing a union member.
   1.232 +
   1.233 +AC_CACHE_CHECK(for cast to union support,
   1.234 +    tcl_cv_cast_to_union,
   1.235 +AC_TRY_COMPILE([],
   1.236 +[
   1.237 +  union foo { int i; double d; };
   1.238 +  union foo f = (union foo) (int) 0;
   1.239 +],
   1.240 +        tcl_cv_cast_to_union=yes,
   1.241 +        tcl_cv_cast_to_union=no)
   1.242 +)
   1.243 +if test "$tcl_cv_cast_to_union" = "yes"; then
   1.244 +    AC_DEFINE(HAVE_CAST_TO_UNION, 1,
   1.245 +            [Defined when compiler supports casting to union type.])
   1.246 +fi
   1.247 +
   1.248 +
   1.249 +#--------------------------------------------------------------------
   1.250 +# Determines the correct binary file extension (.o, .obj, .exe etc.)
   1.251 +#--------------------------------------------------------------------
   1.252 +
   1.253 +AC_OBJEXT
   1.254 +AC_EXEEXT
   1.255 +
   1.256 +#--------------------------------------------------------------------
   1.257 +# Check whether --enable-threads or --disable-threads was given.
   1.258 +#--------------------------------------------------------------------
   1.259 +
   1.260 +SC_ENABLE_THREADS
   1.261 +
   1.262 +#--------------------------------------------------------------------
   1.263 +# The statements below define a collection of symbols related to
   1.264 +# building libtcl as a shared library instead of a static library.
   1.265 +#--------------------------------------------------------------------
   1.266 +
   1.267 +SC_ENABLE_SHARED
   1.268 +
   1.269 +#--------------------------------------------------------------------
   1.270 +# The statements below define a collection of compile flags.  This 
   1.271 +# macro depends on the value of SHARED_BUILD, and should be called
   1.272 +# after SC_ENABLE_SHARED checks the configure switches.
   1.273 +#--------------------------------------------------------------------
   1.274 +
   1.275 +SC_CONFIG_CFLAGS
   1.276 +
   1.277 +#--------------------------------------------------------------------
   1.278 +# Set the default compiler switches based on the --enable-symbols 
   1.279 +# option.  This macro depends on C flags, and should be called
   1.280 +# after SC_CONFIG_CFLAGS macro is called.
   1.281 +#--------------------------------------------------------------------
   1.282 +
   1.283 +SC_ENABLE_SYMBOLS
   1.284 +
   1.285 +TCL_DBGX=${DBGX}
   1.286 +
   1.287 +#--------------------------------------------------------------------
   1.288 +# man2tcl needs this so that it can use errno.h
   1.289 +#--------------------------------------------------------------------
   1.290 +
   1.291 +AC_CHECK_HEADER(errno.h, , MAN2TCLFLAGS="-DNO_ERRNO_H")
   1.292 +AC_SUBST(MAN2TCLFLAGS)
   1.293 +
   1.294 +#------------------------------------------------------------------------
   1.295 +# tclConfig.sh refers to this by a different name
   1.296 +#------------------------------------------------------------------------
   1.297 +
   1.298 +TCL_SHARED_BUILD=${SHARED_BUILD}
   1.299 +
   1.300 +#--------------------------------------------------------------------
   1.301 +# Perform final evaluations of variables with possible substitutions.
   1.302 +#--------------------------------------------------------------------
   1.303 +
   1.304 +TCL_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}"
   1.305 +TCL_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
   1.306 +TCL_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
   1.307 +
   1.308 +eval "TCL_SRC_DIR=\"`cd $srcdir/..; pwd`\""
   1.309 +
   1.310 +eval "TCL_DLL_FILE=tcl${VER}${DLLSUFFIX}"
   1.311 +
   1.312 +eval "TCL_LIB_FILE=${LIBPREFIX}tcl$VER${LIBSUFFIX}"
   1.313 +
   1.314 +eval "TCL_LIB_FLAG=\"-ltcl${VER}${LIBFLAGSUFFIX}\""
   1.315 +eval "TCL_BUILD_LIB_SPEC=\"-L`pwd` ${TCL_LIB_FLAG}\""
   1.316 +eval "TCL_LIB_SPEC=\"-L${libdir} ${TCL_LIB_FLAG}\""
   1.317 +
   1.318 +eval "TCL_STUB_LIB_FILE=\"${LIBPREFIX}tclstub${VER}${LIBSUFFIX}\""
   1.319 +eval "TCL_STUB_LIB_FLAG=\"-ltclstub${VER}${LIBFLAGSUFFIX}\""
   1.320 +eval "TCL_BUILD_STUB_LIB_SPEC=\"-L`pwd` ${TCL_STUB_LIB_FLAG}\""
   1.321 +eval "TCL_STUB_LIB_SPEC=\"-L${libdir} ${TCL_STUB_LIB_FLAG}\""
   1.322 +eval "TCL_BUILD_STUB_LIB_PATH=\"`pwd`/${TCL_STUB_LIB_FILE}\""
   1.323 +eval "TCL_STUB_LIB_PATH=\"${libdir}/${TCL_STUB_LIB_FILE}\""
   1.324 +
   1.325 +# Install time header dir can be set via --includedir
   1.326 +eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
   1.327 +
   1.328 +
   1.329 +eval "DLLSUFFIX=${DLLSUFFIX}"
   1.330 +eval "LIBPREFIX=${LIBPREFIX}"
   1.331 +eval "LIBSUFFIX=${LIBSUFFIX}"
   1.332 +eval "EXESUFFIX=${EXESUFFIX}"
   1.333 +
   1.334 +CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}
   1.335 +CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}
   1.336 +CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}
   1.337 +
   1.338 +#--------------------------------------------------------------------
   1.339 +# Adjust the defines for how the resources are built depending
   1.340 +# on symbols and static vs. shared.
   1.341 +#--------------------------------------------------------------------
   1.342 +
   1.343 +if test ${SHARED_BUILD} = 0 ; then
   1.344 +    if test "${DBGX}" = "g"; then
   1.345 +        RC_DEFINES="${RC_DEFINE} STATIC_BUILD ${RC_DEFINE} DEBUG"
   1.346 +    else
   1.347 +        RC_DEFINES="${RC_DEFINE} STATIC_BUILD"
   1.348 +    fi
   1.349 +else
   1.350 +    if test "${DBGX}" = "g"; then
   1.351 +        RC_DEFINES="${RC_DEFINE} DEBUG"
   1.352 +    else
   1.353 +        RC_DEFINES=""
   1.354 +    fi
   1.355 +fi
   1.356 +
   1.357 +#--------------------------------------------------------------------
   1.358 +#	The statements below define the symbol TCL_PACKAGE_PATH, which
   1.359 +#	gives a list of directories that may contain packages.  The list
   1.360 +#	consists of one directory for machine-dependent binaries and
   1.361 +#	another for platform-independent scripts.
   1.362 +#--------------------------------------------------------------------
   1.363 +
   1.364 +if test "$prefix" != "$exec_prefix"; then
   1.365 +    TCL_PACKAGE_PATH="${libdir} ${prefix}/lib"
   1.366 +else
   1.367 +    TCL_PACKAGE_PATH="${prefix}/lib"
   1.368 +fi
   1.369 +
   1.370 +AC_SUBST(TCL_VERSION)
   1.371 +AC_SUBST(TCL_MAJOR_VERSION)
   1.372 +AC_SUBST(TCL_MINOR_VERSION)
   1.373 +AC_SUBST(TCL_PATCH_LEVEL)
   1.374 +
   1.375 +AC_SUBST(TCL_LIB_FILE)
   1.376 +AC_SUBST(TCL_LIB_FLAG)
   1.377 +# empty on win
   1.378 +AC_SUBST(TCL_LIB_SPEC)
   1.379 +AC_SUBST(TCL_STUB_LIB_FILE)
   1.380 +AC_SUBST(TCL_STUB_LIB_FLAG)
   1.381 +AC_SUBST(TCL_STUB_LIB_SPEC)
   1.382 +AC_SUBST(TCL_STUB_LIB_PATH)
   1.383 +AC_SUBST(TCL_INCLUDE_SPEC)
   1.384 +AC_SUBST(TCL_BUILD_STUB_LIB_SPEC)
   1.385 +AC_SUBST(TCL_BUILD_STUB_LIB_PATH)
   1.386 +AC_SUBST(TCL_DLL_FILE)
   1.387 +
   1.388 +AC_SUBST(TCL_SRC_DIR)
   1.389 +AC_SUBST(TCL_BIN_DIR)
   1.390 +AC_SUBST(TCL_DBGX)
   1.391 +AC_SUBST(CFG_TCL_SHARED_LIB_SUFFIX)
   1.392 +AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX)
   1.393 +AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX)
   1.394 +
   1.395 +# win/tcl.m4 doesn't set (CFLAGS)
   1.396 +AC_SUBST(CFLAGS_DEFAULT)
   1.397 +AC_SUBST(EXTRA_CFLAGS)
   1.398 +AC_SUBST(CYGPATH)
   1.399 +AC_SUBST(DEPARG)
   1.400 +AC_SUBST(CC_OBJNAME)
   1.401 +AC_SUBST(CC_EXENAME)
   1.402 +
   1.403 +# win/tcl.m4 doesn't set (LDFLAGS)
   1.404 +AC_SUBST(LDFLAGS_DEFAULT)
   1.405 +AC_SUBST(LDFLAGS_DEBUG)
   1.406 +AC_SUBST(LDFLAGS_OPTIMIZE)
   1.407 +AC_SUBST(LDFLAGS_CONSOLE)
   1.408 +AC_SUBST(LDFLAGS_WINDOW)
   1.409 +AC_SUBST(AR)
   1.410 +AC_SUBST(RANLIB)
   1.411 +
   1.412 +AC_SUBST(STLIB_LD)
   1.413 +AC_SUBST(SHLIB_LD)
   1.414 +AC_SUBST(SHLIB_LD_LIBS)
   1.415 +AC_SUBST(SHLIB_CFLAGS)
   1.416 +AC_SUBST(SHLIB_SUFFIX)
   1.417 +AC_SUBST(TCL_SHARED_BUILD)
   1.418 +
   1.419 +AC_SUBST(LIBS)
   1.420 +AC_SUBST(LIBS_GUI)
   1.421 +AC_SUBST(DLLSUFFIX)
   1.422 +AC_SUBST(LIBPREFIX)
   1.423 +AC_SUBST(LIBSUFFIX)
   1.424 +AC_SUBST(EXESUFFIX)
   1.425 +AC_SUBST(LIBRARIES)
   1.426 +AC_SUBST(MAKE_LIB)
   1.427 +AC_SUBST(POST_MAKE_LIB)
   1.428 +AC_SUBST(MAKE_DLL)
   1.429 +AC_SUBST(MAKE_EXE)
   1.430 +
   1.431 +# empty on win, but needs sub'ing
   1.432 +AC_SUBST(TCL_BUILD_LIB_SPEC)
   1.433 +AC_SUBST(TCL_LD_SEARCH_FLAGS)
   1.434 +AC_SUBST(TCL_NEEDS_EXP_FILE)
   1.435 +AC_SUBST(TCL_BUILD_EXP_FILE)
   1.436 +AC_SUBST(TCL_EXP_FILE)
   1.437 +AC_SUBST(DL_LIBS)
   1.438 +AC_SUBST(LIBOBJS)
   1.439 +AC_SUBST(TCL_LIB_VERSIONS_OK)
   1.440 +AC_SUBST(TCL_PACKAGE_PATH)
   1.441 +
   1.442 +# win only
   1.443 +AC_SUBST(TCL_DDE_VERSION)
   1.444 +AC_SUBST(TCL_DDE_MAJOR_VERSION)
   1.445 +AC_SUBST(TCL_DDE_MINOR_VERSION)
   1.446 +AC_SUBST(TCL_REG_VERSION)
   1.447 +AC_SUBST(TCL_REG_MAJOR_VERSION)
   1.448 +AC_SUBST(TCL_REG_MINOR_VERSION)
   1.449 +
   1.450 +AC_SUBST(RC)
   1.451 +AC_SUBST(RC_OUT)
   1.452 +AC_SUBST(RC_TYPE)
   1.453 +AC_SUBST(RC_INCLUDE)
   1.454 +AC_SUBST(RC_DEFINE)
   1.455 +AC_SUBST(RC_DEFINES)
   1.456 +AC_SUBST(RES)
   1.457 +
   1.458 +AC_OUTPUT(Makefile tclConfig.sh tcl.hpj)