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.47 2007/02/09 19:06:47 hobbs Exp $
7
8#-----------------------------------------------------------------------
9# Set your package name and version numbers here.
10#
11# This initializes the environment with PACKAGE_NAME and PACKAGE_VERSION
12# set as provided.  These will also be added as -D defs in your Makefile
13# so you can encode the package version directly into the source files.
14#-----------------------------------------------------------------------
15
16AC_INIT([QuickTimeTcl], [3.2])
17
18if test ! -d /System/Library/Frameworks/Carbon.framework; then
19    AC_MSG_ERROR([Mac OS X with Carbon required!])
20fi
21
22#--------------------------------------------------------------------
23# Call TEA_INIT as the first TEA_ macro to set up initial vars.
24# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
25# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
26#--------------------------------------------------------------------
27
28TEA_INIT([3.9])
29
30AC_CONFIG_AUX_DIR(tclconfig)
31
32#--------------------------------------------------------------------
33# Load the tclConfig.sh file
34#--------------------------------------------------------------------
35
36TEA_PATH_TCLCONFIG
37TEA_LOAD_TCLCONFIG
38
39#--------------------------------------------------------------------
40# Load the tkConfig.sh file if necessary (Tk extension)
41#--------------------------------------------------------------------
42
43TEA_PATH_TKCONFIG
44TEA_LOAD_TKCONFIG
45
46#-----------------------------------------------------------------------
47# Handle the --prefix=... option by defaulting to what Tcl gave.
48# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
49#-----------------------------------------------------------------------
50
51TEA_PREFIX
52
53#-----------------------------------------------------------------------
54# Standard compiler checks.
55# This sets up CC by using the CC env var, or looks for gcc otherwise.
56# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
57# the basic setup necessary to compile executables.
58#-----------------------------------------------------------------------
59
60TEA_SETUP_COMPILER
61
62#-----------------------------------------------------------------------
63# Specify the C source files to compile in TEA_ADD_SOURCES,
64# public headers that need to be installed in TEA_ADD_HEADERS,
65# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
66# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
67# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
68# and PKG_TCL_SOURCES.
69#-----------------------------------------------------------------------
70
71TEA_ADD_SOURCES([MoviePlayer.c MovieQTVRUtils.c QuickTimeTcl.c SeqGrabber.c
72    Tfp_Arrays.c TimeCode.c UserData.c EffectCommand.c ExportCommand.c
73    MovieCallBack.c MovieUtils.c TracksCommand.c Utils.c osxMacTcl.c
74    Broadcast.c NavigationGetFile.c SystemUI.c])
75TEA_ADD_HEADERS([])
76TEA_ADD_INCLUDES([])
77TEA_ADD_LIBS([-framework Carbon -framework QuickTime])
78TEA_ADD_CFLAGS([-fpascal-strings -DTARGET_OS_MAC=1 -DTARGET_API_MAC_CARBON=1])
79TEA_ADD_STUB_SOURCES([])
80TEA_ADD_TCL_SOURCES([movie.tcl])
81
82AC_SUBST(CLEANFILES)
83
84#--------------------------------------------------------------------
85# Choose which headers you need.  Extension authors should try very
86# hard to only rely on the Tcl public header files.  Internal headers
87# contain private data structures and are subject to change without
88# notice.
89# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
90#--------------------------------------------------------------------
91
92TEA_PUBLIC_TCL_HEADERS
93#TEA_PRIVATE_TCL_HEADERS
94
95TEA_PUBLIC_TK_HEADERS
96TEA_PRIVATE_TK_HEADERS
97TEA_PATH_X
98
99#--------------------------------------------------------------------
100# Check whether --enable-threads or --disable-threads was given.
101# This auto-enables if Tcl was compiled threaded.
102#--------------------------------------------------------------------
103
104TEA_ENABLE_THREADS
105
106#--------------------------------------------------------------------
107# The statement below defines a collection of symbols related to
108# building as a shared library instead of a static library.
109#--------------------------------------------------------------------
110
111TEA_ENABLE_SHARED
112
113#--------------------------------------------------------------------
114# This macro figures out what flags to use with the compiler/linker
115# when building shared/static debug/optimized objects.  This information
116# can be taken from the tclConfig.sh file, but this figures it all out.
117#--------------------------------------------------------------------
118
119TEA_CONFIG_CFLAGS
120
121#--------------------------------------------------------------------
122# Set the default compiler switches based on the --enable-symbols option.
123#--------------------------------------------------------------------
124
125TEA_ENABLE_SYMBOLS
126
127#--------------------------------------------------------------------
128# Everyone should be linking against the Tcl stub library.  If you
129# can't for some reason, remove this definition.  If you aren't using
130# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
131# link against the non-stubbed Tcl library.  Add Tk too if necessary.
132#--------------------------------------------------------------------
133
134AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
135AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
136
137#--------------------------------------------------------------------
138# This macro generates a line to use when building a library.  It
139# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
140# and TEA_LOAD_TCLCONFIG macros above.
141#--------------------------------------------------------------------
142
143TEA_MAKE_LIB
144
145#--------------------------------------------------------------------
146# Determine the name of the tclsh and/or wish executables in the
147# Tcl and Tk build directories or the location they were installed
148# into. These paths are used to support running test cases only,
149# the Makefile should not be making use of these paths to generate
150# a pkgIndex.tcl file or anything else at extension build time.
151#--------------------------------------------------------------------
152
153TEA_PROG_TCLSH
154TEA_PROG_WISH
155
156#--------------------------------------------------------------------
157# Finally, substitute all of the various values into the Makefile.
158# You may alternatively have a special pkgIndex.tcl.in or other files
159# which require substituting th AC variables in.  Include these here.
160#--------------------------------------------------------------------
161
162AC_OUTPUT([Makefile pkgIndex.tcl])
163