1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# tcl.m4 --
#
# This file provides a set of autoconf macros to help TEA-enable
# a Tcl extension.
#
# Copyright (c) 1999-2000 Ajuba Solutions.
# Copyright (c) 2002-2003 ActiveState Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: tcl.m4,v 1.2 2004/03/20 01:18:25 hobbs Exp $
AC_PREREQ(2.50)
#------------------------------------------------------------------------
# TEA_PATH_TCLCONFIG --
#
# Locate the tclConfig.sh file and perform a sanity check on
|
|
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# tcl.m4 --
#
# This file provides a set of autoconf macros to help TEA-enable
# a Tcl extension.
#
# Copyright (c) 1999-2000 Ajuba Solutions.
# Copyright (c) 2002-2003 ActiveState Corporation.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: tcl.m4,v 1.3 2004/06/29 10:38:39 patthoyts Exp $
AC_PREREQ(2.50)
#------------------------------------------------------------------------
# TEA_PATH_TCLCONFIG --
#
# Locate the tclConfig.sh file and perform a sanity check on
|
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
|
# HAVE_TYPE_OFF64_T
#
#--------------------------------------------------------------------
AC_DEFUN(TEA_TCL_64BIT_FLAGS, [
AC_MSG_CHECKING([for 64-bit integer type])
AC_CACHE_VAL(tcl_cv_type_64bit,[
AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
tcl_cv_type_64bit=__int64,tcl_cv_type_64bit=none
AC_TRY_RUN([#include <unistd.h>
int main() {exit(!(sizeof(long long) > sizeof(long)));}
], tcl_cv_type_64bit="long long"))])
if test "${tcl_cv_type_64bit}" = none ; then
AC_MSG_RESULT([using long])
elif test "${tcl_cv_type_64bit}" = "__int64" ; then
# We actually want to use the default tcl.h checks in this
# case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
AC_MSG_RESULT([using Tcl header defaults])
else
AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
|
>
>
|
>
>
>
|
|
|
>
|
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
|
# HAVE_TYPE_OFF64_T
#
#--------------------------------------------------------------------
AC_DEFUN(TEA_TCL_64BIT_FLAGS, [
AC_MSG_CHECKING([for 64-bit integer type])
AC_CACHE_VAL(tcl_cv_type_64bit,[
tcl_cv_type_64bit=none
# See if the compiler knows natively about __int64
AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
tcl_type_64bit=__int64, tcl_type_64bit="long long")
# See if we should use long anyway Note that we substitute in the
# type that is our current guess for a 64-bit type inside this check
# program, so it should be modified only carefully...
AC_TRY_COMPILE(,[switch (0) {
case 1: case (sizeof(]${tcl_type_64bit}[)==sizeof(long)): ;
}],tcl_cv_type_64bit=${tcl_type_64bit})])
if test "${tcl_cv_type_64bit}" = none ; then
AC_DEFINE(TCL_WIDE_INT_IS_LONG)
AC_MSG_RESULT([using long])
elif test "${tcl_cv_type_64bit}" = "__int64" ; then
# We actually want to use the default tcl.h checks in this
# case to handle both TCL_WIDE_INT_TYPE and TCL_LL_MODIFIER*
AC_MSG_RESULT([using Tcl header defaults])
else
AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
|