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#-----------------------------------------------------------------------
7# Sample configure.ac for Tcl Extensions.  The only places you should
8# need to modify this file are marked by the string __CHANGE__
9#-----------------------------------------------------------------------
10
11#-----------------------------------------------------------------------
12# __CHANGE__
13# Set your package name and version numbers here.
14#
15# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
16# set as provided.  These will also be added as -D defs in your Makefile
17# so you can encode the package version directly into the source files.
18# This will also define a special symbol for Windows (BUILD_<PACKAGE_NAME>
19# so that we create the export library with the dll.
20#-----------------------------------------------------------------------
21
22AC_INIT([tdbcsqlite3],[1.1.3])
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()
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# Load the tdbcConfig.sh file
50#----------------------------------------------------------------------
51
52TEA_PATH_CONFIG(tdbc)
53TEA_LOAD_CONFIG(tdbc)
54# The next bit probably ought to be in TEA_LOAD_CONFIG
55AC_MSG_WARN([Looking for "${tdbc_BIN_DIR}/Makefile"])
56if test -f "${tdbc_BIN_DIR}/Makefile" ; then
57    AC_MSG_WARN([Found Makefile - using build include spec and lib specs for tdbc])
58    tdbc_INCLUDE_SPEC=${tdbc_BUILD_INCLUDE_SPEC}
59    tdbc_LIBRARY_PATH=${tdbc_BUILD_LIBRARY_PATH}
60fi
61AC_SUBST(tdbc_LIBRARY_PATH)
62AC_SUBST(TDBC_VERSION)
63AC_SUBST(tdbc_BIN_DIR)
64AC_SUBST(TDBC_LIB_FILE)
65
66#-----------------------------------------------------------------------
67# Handle the --prefix=... option by defaulting to what Tcl gave.
68# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
69#-----------------------------------------------------------------------
70
71TEA_PREFIX
72
73#-----------------------------------------------------------------------
74# Standard compiler checks.
75# This sets up CC by using the CC env var, or looks for gcc otherwise.
76# This also calls AC_PROG_CC and a few others to create the basic setup
77# necessary to compile executables.
78#-----------------------------------------------------------------------
79
80#TEA_SETUP_COMPILER
81
82#-----------------------------------------------------------------------
83# __CHANGE__
84# Specify the C source files to compile in TEA_ADD_SOURCES,
85# public headers that need to be installed in TEA_ADD_HEADERS,
86# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
87# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
88# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
89# and PKG_TCL_SOURCES.
90#-----------------------------------------------------------------------
91
92#TEA_ADD_SOURCES([])
93#TEA_ADD_HEADERS([])
94#TEA_ADD_INCLUDES([])
95#TEA_ADD_LIBS([])
96#TEA_ADD_CFLAGS([])
97#TEA_ADD_STUB_SOURCES([])
98TEA_ADD_TCL_SOURCES([library/tdbcsqlite3.tcl])
99
100#--------------------------------------------------------------------
101# __CHANGE__
102#
103# You can add more files to clean if your extension creates any extra
104# files by extending CLEANFILES.
105# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
106# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
107#
108# A few miscellaneous platform-specific items:
109# TEA_ADD_* any platform specific compiler/build info here.
110#--------------------------------------------------------------------
111
112#CLEANFILES="$CLEANFILES pkgIndex.tcl"
113if test "${TEA_PLATFORM}" = "windows" ; then
114    # Ensure no empty if clauses
115    :
116    #TEA_ADD_SOURCES([win/winFile.c])
117    #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
118else
119    # Ensure no empty else clauses
120    :
121    #TEA_ADD_SOURCES([unix/unixFile.c])
122    #TEA_ADD_LIBS([-lsuperfly])
123fi
124
125#--------------------------------------------------------------------
126# __CHANGE__
127# Choose which headers you need.  Extension authors should try very
128# hard to only rely on the Tcl public header files.  Internal headers
129# contain private data structures and are subject to change without
130# notice.
131# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
132#--------------------------------------------------------------------
133
134#TEA_PUBLIC_TCL_HEADERS
135#TEA_PRIVATE_TCL_HEADERS
136
137#TEA_PUBLIC_TK_HEADERS
138#TEA_PRIVATE_TK_HEADERS
139#TEA_PATH_X
140
141#--------------------------------------------------------------------
142# Check whether --enable-threads or --disable-threads was given.
143# This auto-enables if Tcl was compiled threaded.
144#--------------------------------------------------------------------
145
146TEA_ENABLE_THREADS
147
148#--------------------------------------------------------------------
149# The statement below defines a collection of symbols related to
150# building as a shared library instead of a static library.
151#--------------------------------------------------------------------
152
153#TEA_ENABLE_SHARED
154
155#--------------------------------------------------------------------
156# This macro figures out what flags to use with the compiler/linker
157# when building shared/static debug/optimized objects.  This information
158# can be taken from the tclConfig.sh file, but this figures it all out.
159#--------------------------------------------------------------------
160
161#TEA_CONFIG_CFLAGS
162
163#--------------------------------------------------------------------
164# Set the default compiler switches based on the --enable-symbols option.
165#--------------------------------------------------------------------
166
167TEA_ENABLE_SYMBOLS
168
169#--------------------------------------------------------------------
170# This macro generates a line to use when building a library.  It
171# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
172# and TEA_LOAD_TCLCONFIG macros above.
173#--------------------------------------------------------------------
174
175#TEA_MAKE_LIB
176
177#--------------------------------------------------------------------
178# Determine the name of the tclsh and/or wish executables in the
179# Tcl and Tk build directories or the location they were installed
180# into. These paths are used to support running test cases only,
181# the Makefile should not be making use of these paths to generate
182# a pkgIndex.tcl file or anything else at extension build time.
183#--------------------------------------------------------------------
184
185TEA_PROG_TCLSH
186#TEA_PROG_WISH
187
188#--------------------------------------------------------------------
189# Substitute variables needed for .tm install.
190#--------------------------------------------------------------------
191
192AC_SUBST(TCL_VERSION)
193AC_SUBST(TCL_MAJOR_VERSION)
194AC_SUBST(TCL_MINOR_VERSION)
195
196#--------------------------------------------------------------------
197# Finally, substitute all of the various values into the Makefile.
198# You may alternatively have a special pkgIndex.tcl.in or other files
199# which require substituting the AC variables in. Include these here.
200#--------------------------------------------------------------------
201
202AC_CONFIG_FILES([Makefile pkgIndex.tcl])
203AC_OUTPUT
204