source: tol/toltcl/configure.in @ e95dfdb

1941-docker-image-to-testdevel
Last change on this file since e95dfdb was 6d7c032, checked in by Jorge Pérez <josp.jorge@…>, 15 years ago

refs #1409, now trunk is 3.2

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@4151 be4846ae-f051-483a-831f-b64e7d08527f

  • Property mode set to 100755
File size: 9.5 KB
Line 
1#!/bin/bash -norc
2dnl     This file is an input file used by the GNU "autoconf" program to
3dnl     generate the file "configure", which is run during Tcl installation
4dnl     to configure the system for the local environment.
5#
6# RCS: @(#) $Id: configure.in,v 1.23 2007/11/13 13:03:51 josp Exp $
7
8#-----------------------------------------------------------------------
9# Sample configure.in for Tcl Extensions.  The only places you should
10# need to modify this file are marked by the string __CHANGE__
11#-----------------------------------------------------------------------
12
13#-----------------------------------------------------------------------
14# __CHANGE__
15# Set your package name and version numbers here.
16#
17# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
18# set as provided.  These will also be added as -D defs in your Makefile
19# so you can encode the package version directly into the source files.
20#-----------------------------------------------------------------------
21
22AC_INIT([toltcl], [3.2])
23
24#--------------------------------------------------------------------
25# Call TEA_INIT as the first TEA_ macro to set up initial vars.
26# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
27# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
28#--------------------------------------------------------------------
29
30TEA_INIT([3.5])
31
32AC_CONFIG_AUX_DIR(tclconfig)
33
34#--------------------------------------------------------------------
35# Load the tclConfig.sh file
36#--------------------------------------------------------------------
37
38TEA_PATH_TCLCONFIG
39TEA_LOAD_TCLCONFIG
40
41#--------------------------------------------------------------------
42# Load the tkConfig.sh file if necessary (Tk extension)
43#--------------------------------------------------------------------
44
45#TEA_PATH_TKCONFIG
46#TEA_LOAD_TKCONFIG
47
48#-----------------------------------------------------------------------
49# Handle the --prefix=... option by defaulting to what Tcl gave.
50# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
51#-----------------------------------------------------------------------
52
53TEA_PREFIX
54
55#-----------------------------------------------------------------------
56# Standard compiler checks.
57# This sets up CC by using the CC env var, or looks for gcc otherwise.
58# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
59# the basic setup necessary to compile executables.
60#-----------------------------------------------------------------------
61
62TEA_SETUP_COMPILER
63
64#-----------------------------------------------------------------------
65# __CHANGE__
66# Specify the C source files to compile in TEA_ADD_SOURCES,
67# public headers that need to be installed in TEA_ADD_HEADERS,
68# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
69# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
70# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
71# and PKG_TCL_SOURCES.
72#-----------------------------------------------------------------------
73
74TEA_ADD_SOURCES([crash.c toltcl.c pool.cpp tclutils.cpp tolaccess.cpp tolsergrp.cpp toltableset.cpp toltime.cpp])
75TEA_ADD_HEADERS([])
76TEA_ADD_INCLUDES([-I\"${srcdir}/generic\"])
77TEA_ADD_LIBS([])
78TEA_ADD_CFLAGS([])
79TEA_ADD_STUB_SOURCES([])
80TEA_ADD_TCL_SOURCES([library/toltcl.tcl])
81
82#--------------------------------------------------------------------
83# __CHANGE__
84# A few miscellaneous platform-specific items:
85#
86# Define a special symbol for Windows (BUILD_sample in this case) so
87# that we create the export library with the dll.
88#
89# Windows creates a few extra files that need to be cleaned up.
90# You can add more files to clean if your extension creates any extra
91# files.
92#
93# TEA_ADD_* any platform specific compiler/build info here.
94#--------------------------------------------------------------------
95
96if test "${TEA_PLATFORM}" = "windows" ; then
97    AC_DEFINE(BUILD_toltcl, 1, [Build windows export dll])
98    CLEANFILES="pkgIndex.tcl *.lib *.dll *.exp *.ilk *.pdb vc*.pch"
99else
100    CLEANFILES="pkgIndex.tcl"
101fi
102AC_SUBST(CLEANFILES)
103
104#--------------------------------------------------------------------
105# __CHANGE__
106# Choose which headers you need.  Extension authors should try very
107# hard to only rely on the Tcl public header files.  Internal headers
108# contain private data structures and are subject to change without
109# notice.
110# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
111#--------------------------------------------------------------------
112TEA_PUBLIC_TCL_HEADERS
113
114#--------------------------------------------------------------------
115# Check whether --enable-threads or --disable-threads was given.
116# This auto-enables if Tcl was compiled threaded.
117#--------------------------------------------------------------------
118
119TEA_ENABLE_THREADS
120
121#--------------------------------------------------------------------
122# The statement below defines a collection of symbols related to
123# building as a shared library instead of a static library.
124#--------------------------------------------------------------------
125
126TEA_ENABLE_SHARED
127
128#--------------------------------------------------------------------
129# This macro figures out what flags to use with the compiler/linker
130# when building shared/static debug/optimized objects.  This information
131# can be taken from the tclConfig.sh file, but this figures it all out.
132#--------------------------------------------------------------------
133
134TEA_CONFIG_CFLAGS
135
136#--------------------------------------------------------------------
137# Set the default compiler switches based on the --enable-symbols option.
138#--------------------------------------------------------------------
139
140TEA_ENABLE_SYMBOLS
141
142#--------------------------------------------------------------------
143# Everyone should be linking against the Tcl stub library.  If you
144# can't for some reason, remove this definition.  If you aren't using
145# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
146# link against the non-stubbed Tcl library.  Add Tk too if necessary.
147#--------------------------------------------------------------------
148
149AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
150#AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
151
152#--------------------------------------------------------------------
153# This macro generates a line to use when building a library.  It
154# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
155# and TEA_LOAD_TCLCONFIG macros above.
156#--------------------------------------------------------------------
157
158TEA_MAKE_LIB
159
160#--------------------------------------------------
161# TDT Macros
162AC_ARG_WITH([hashmap],AC_HELP_STRING([--with-hashmap=<model>],[<model> may be one of: google, msvc, gcc, icc]),[tol_hashmap=$withval])
163
164AC_ARG_ENABLE([DS],[AC_HELP_STRING([--enable-DS],[Turn on Dynamic Scope (instead of Lexical Scope)])],[AC_DEFINE([__USE_DYNSCOPE__],[1],[Active Dynamic Scope (instead of Lexical Scope)])])
165AC_ARG_ENABLE([DBTIME_MONITOR],[AC_HELP_STRING([--enable-DBTIME-MONITOR],[Turn on monitoring of database time consumption])],[AC_DEFINE([__DBTIME_MONITOR__],[1],[Active Database Time Consumption Monitor])][DBTIME_MONITOR=true])
166AC_ARG_ENABLE([OIS],[AC_HELP_STRING([--enable-OIS],[Turn on OIS (Object Serialization)])],[AC_DEFINE([__USE_OIS__],[1],[Active Tol Object Serialization])][OIS=true])
167AC_ARG_ENABLE([ZipArchive],[AC_HELP_STRING([--enable-ZipArchive],[Turn on ZipArchive Support in OIS module])],[AC_DEFINE([__USE_ZIP_ARCHIVE__],[1],[Turn on ZipArchive Support in OIS module])][ZipArchive=true])
168AC_ARG_ENABLE([pool],[AC_HELP_STRING([--enable-pool],[Still no description])],[pool=true])
169
170TOLTCL_REQUIRE_PACKAGE([gsl],[GNU Scientific Library],[gsl/gsl_errno.h],[gsl])
171TOLTCL_REQUIRE_PACKAGE([tol],[TOL Language],[tol/tol_bcommon.h],[tol])
172#TOLTCL_REQUIRE_PACKAGE([readline],[Readline],[readline/readline.h],[readline])
173
174AC_DEFINE([__USE_NAMEBLOCK__],[1],[No description])
175AC_DEFINE([__HASH_MAP_MSVC__],[1],[No description])
176AC_DEFINE([__HASH_MAP_GOOGLE__],[2],[No description])
177AC_DEFINE([__HASH_MAP_GCC__],[3],[No description])
178AC_DEFINE([__HASH_MAP_ICC__],[4],[No description])
179
180if test "${tol_hashmap}" = "google" ; then
181  AC_DEFINE([__USE_HASH_MAP__],[__HASH_MAP_GOOGLE__],[No description])
182elif test "${tol_hashmap}" = "msvc" ; then
183  AC_DEFINE([__USE_HASH_MAP__],[__HASH_MAP_MSVC__],[No description])
184elif test "${tol_hashmap}" = "icc" ; then
185  AC_DEFINE([__USE_HASH_MAP__],[__HASH_MAP_ICC__],[No description])
186else
187  AC_DEFINE([__USE_HASH_MAP__],[__HASH_MAP_GCC__],[No description])
188fi
189
190AC_DEFINE([__POOL_NONE__],[0],[Still no description])
191AC_DEFINE([__POOL_BFSMEM__],[1],[Still no description])
192
193if test "${pool}" = "true"; then
194   AC_DEFINE([__USE_POOL__],[__POOL_BFSMEM__],[Still no description])
195else
196   AC_DEFINE([__USE_POOL__],[__POOL_NONE__],[Still no description])
197fi
198
199TOL_DEFINE="-DUNIX -DUSE_DELAY_INIT -D_TOL_FROZEN_"
200
201TEA_ADD_CFLAGS([${TOL_DEFINE}])
202
203#--------------------------------------------------------------------
204# Determine the name of the tclsh and/or wish executables in the
205# Tcl and Tk build directories or the location they were installed
206# into. These paths are used to support running test cases only,
207# the Makefile should not be making use of these paths to generate
208# a pkgIndex.tcl file or anything else at extension build time.
209#--------------------------------------------------------------------
210
211TEA_PROG_TCLSH
212#TEA_PROG_WISH
213
214#--------------------------------------------------------------------
215# Finally, substitute all of the various values into the Makefile.
216# You may alternatively have a special pkgIndex.tcl.in or other files
217# which require substituting th AC variables in.  Include these here.
218#--------------------------------------------------------------------
219
220AC_OUTPUT([Makefile pkgIndex.tcl])
Note: See TracBrowser for help on using the repository browser.