2 dnl This
file is an input
file used by the GNU
"autoconf" program to
3 dnl generate the
file "configure", which is run during Tcl installation
4 dnl to configure the system
for the
local environment.
6 # RCS: @(#) $Id: configure.in,v 1.47 2007/02/09 19:06:47 hobbs Exp $
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 #-----------------------------------------------------------------------
13 #-----------------------------------------------------------------------
15 # Set your package name and version numbers here.
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 #-----------------------------------------------------------------------
22 AC_INIT
([inotify
], [1])
24 AC_SUBST
(EXTRA_VERSION
)
26 #--------------------------------------------------------------------
27 # Call TEA_INIT as the first TEA_ macro to set up initial vars.
28 # This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
29 # as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
30 #--------------------------------------------------------------------
34 AC_CONFIG_AUX_DIR
(tclconfig
)
36 #--------------------------------------------------------------------
37 # Load the tclConfig.sh file
38 #--------------------------------------------------------------------
43 #--------------------------------------------------------------------
44 # Load the tkConfig.sh file if necessary (Tk extension)
45 #--------------------------------------------------------------------
50 #-----------------------------------------------------------------------
51 # Handle the --prefix=... option by defaulting to what Tcl gave.
52 # Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
53 #-----------------------------------------------------------------------
57 #-----------------------------------------------------------------------
58 # Standard compiler checks.
59 # This sets up CC by using the CC env var, or looks for gcc otherwise.
60 # This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
61 # the basic setup necessary to compile executables.
62 #-----------------------------------------------------------------------
66 #-----------------------------------------------------------------------
68 # Specify the C source files to compile in TEA_ADD_SOURCES,
69 # public headers that need to be installed in TEA_ADD_HEADERS,
70 # stub library C source files to compile in TEA_ADD_STUB_SOURCES,
71 # and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
72 # This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
73 # and PKG_TCL_SOURCES.
74 #-----------------------------------------------------------------------
76 TEA_ADD_SOURCES
([main.c
])
81 TEA_ADD_STUB_SOURCES
([])
82 AC_OUTPUT
([inotify.tcl
])
83 TEA_ADD_TCL_SOURCES
([inotify.tcl
scripts
/*])
85 #--------------------------------------------------------------------
87 # A few miscellaneous platform-specific items:
89 # Define a special symbol for Windows (BUILD_sample in this case) so
90 # that we create the export library with the dll.
92 # Windows creates a few extra files that need to be cleaned up.
93 # You can add more files to clean if your extension creates any extra
96 # TEA_ADD_* any platform specific compiler/build info here.
97 #--------------------------------------------------------------------
99 # Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
100 # and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
101 CLEANFILES
="inotify.tcl scripts-stamp scripts/tclIndex"
104 #--------------------------------------------------------------------
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
110 # This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
111 #--------------------------------------------------------------------
113 TEA_PUBLIC_TCL_HEADERS
114 #TEA_PRIVATE_TCL_HEADERS
116 #TEA_PUBLIC_TK_HEADERS
117 #TEA_PRIVATE_TK_HEADERS
120 #--------------------------------------------------------------------
121 # Check whether --enable-threads or --disable-threads was given.
122 # This auto-enables if Tcl was compiled threaded.
123 #--------------------------------------------------------------------
127 #--------------------------------------------------------------------
128 # The statement below defines a collection of symbols related to
129 # building as a shared library instead of a static library.
130 #--------------------------------------------------------------------
134 #--------------------------------------------------------------------
135 # This macro figures out what flags to use with the compiler/linker
136 # when building shared/static debug/optimized objects. This information
137 # can be taken from the tclConfig.sh file, but this figures it all out.
138 #--------------------------------------------------------------------
142 #--------------------------------------------------------------------
143 # Set the default compiler switches based on the --enable-symbols option.
144 #--------------------------------------------------------------------
148 #--------------------------------------------------------------------
149 # Everyone should be linking against the Tcl stub library. If you
150 # can't for some reason, remove this definition. If you aren't using
151 # stubs, you also need to modify the SHLIB_LD_LIBS setting below to
152 # link against the non-stubbed Tcl library. Add Tk too if necessary.
153 #--------------------------------------------------------------------
155 AC_DEFINE
(USE_TCL_STUBS
, 1, [Use Tcl stubs
])
156 #AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
158 #--------------------------------------------------------------------
159 # This macro generates a line to use when building a library. It
160 # depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
161 # and TEA_LOAD_TCLCONFIG macros above.
162 #--------------------------------------------------------------------
166 #--------------------------------------------------------------------
167 # Determine the name of the tclsh and/or wish executables in the
168 # Tcl and Tk build directories or the location they were installed
169 # into. These paths are used to support running test cases only,
170 # the Makefile should not be making use of these paths to generate
171 # a pkgIndex.tcl file or anything else at extension build time.
172 #--------------------------------------------------------------------
177 AC_CHECK_HEADER
([tclstuff.h
], [], AC_MSG_ERROR
([Need tclstuff.h from tcldev
(available from sourceforge.net
/projects
/tcl-tlc
)]))
179 #--------------------------------------------------------------------
180 # Finally, substitute all of the various values into the Makefile.
181 # You may alternatively have a special pkgIndex.tcl.in or other files
182 # which require substituting th AC variables in. Include these here.
183 #--------------------------------------------------------------------
185 AC_OUTPUT
([Makefile pkgIndex.tcl teapot.txt
])