source: trunk/gui/configure.in @ 708

Last change on this file since 708 was 708, checked in by dkearney, 17 years ago

updateing build system for rappture and language bindings.
librappture now includes a static version of libscew.
this means librappture needs to be linked directly against libexpat.
removed references to libscew from language bindings' makefiles.
corrected matlab and octave makefiles to only compile when dependencies are updated.
added --libdir flag so you can install platform dependent files into lib64 on 64-bit systems.
adjusted the rappture.env file to add lib64 directories to search paths incase they exist.

File size: 12.0 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.46 2006/01/23 19:18:55 hobbs 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([RapptureGUI], [1.0])
23
24PACKAGE=RapptureGUI
25
26MAJOR_VERSION=1
27MINOR_VERSION=0
28VERSION=${MAJOR_VERSION}.${MINOR_VERSION}
29
30#--------------------------------------------------------------------
31# Call TEA_INIT as the first TEA_ macro to set up initial vars.
32# This will define a ${TEA_PLATFORM} variable == "unix" or "windows"
33# as well as PKG_LIB_FILE and PKG_STUB_LIB_FILE.
34#--------------------------------------------------------------------
35
36TEA_INIT([3.5])
37
38AC_CONFIG_AUX_DIR(tclconfig)
39
40#--------------------------------------------------------------------
41# Extra build options
42#--------------------------------------------------------------------
43AC_ARG_WITH(blt, [  --with-blt=DIR          Find bltInt.h in DIR],
44  blt_source_dir=$withval)
45
46#--------------------------------------------------------------------
47# Load the tclConfig.sh file
48#--------------------------------------------------------------------
49
50TEA_PATH_TCLCONFIG
51TEA_LOAD_TCLCONFIG
52
53#--------------------------------------------------------------------
54# Load the tkConfig.sh file if necessary (Tk extension)
55#--------------------------------------------------------------------
56
57#TEA_PATH_TKCONFIG
58#TEA_LOAD_TKCONFIG
59
60#-----------------------------------------------------------------------
61# Handle the --prefix=... option by defaulting to what Tcl gave.
62# Must be called after TEA_LOAD_TCLCONFIG and before TEA_SETUP_COMPILER.
63#-----------------------------------------------------------------------
64
65TEA_PREFIX
66
67#-----------------------------------------------------------------------
68# Standard compiler checks.
69# This sets up CC by using the CC env var, or looks for gcc otherwise.
70# This also calls AC_PROG_CC, AC_PROG_INSTALL and a few others to create
71# the basic setup necessary to compile executables.
72#-----------------------------------------------------------------------
73
74TEA_SETUP_COMPILER
75
76#-----------------------------------------------------------------------
77# __CHANGE__
78# Specify the C source files to compile in TEA_ADD_SOURCES,
79# public headers that need to be installed in TEA_ADD_HEADERS,
80# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
81# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
82# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
83# and PKG_TCL_SOURCES.
84#-----------------------------------------------------------------------
85
86TEA_ADD_SOURCES([RpInit.c RpRlimit.c RpRusage.c RpSignal.c RpDaemon.c])
87TEA_ADD_HEADERS([])
88TEA_ADD_INCLUDES([])
89TEA_ADD_CFLAGS([])
90TEA_ADD_STUB_SOURCES([])
91TEA_ADD_TCL_SOURCES([scripts/analyzer.tcl scripts/animover.tcl])
92TEA_ADD_TCL_SOURCES([scripts/balloon.tcl scripts/booleanentry.tcl])
93TEA_ADD_TCL_SOURCES([scripts/bugreport.tcl scripts/choiceentry.tcl])
94TEA_ADD_TCL_SOURCES([scripts/cloud.tcl scripts/color.tcl])
95TEA_ADD_TCL_SOURCES([scripts/combobox.tcl scripts/contourresult.tcl])
96TEA_ADD_TCL_SOURCES([scripts/controlOwner.tcl scripts/controls.tcl])
97TEA_ADD_TCL_SOURCES([scripts/curve.tcl scripts/deviceEditor.tcl])
98TEA_ADD_TCL_SOURCES([scripts/deviceLayout1D.tcl scripts/deviceViewer1D.tcl])
99TEA_ADD_TCL_SOURCES([scripts/deviceresult.tcl scripts/dispatcher.tcl])
100TEA_ADD_TCL_SOURCES([scripts/dropdown.tcl scripts/dropdownlist.tcl])
101TEA_ADD_TCL_SOURCES([scripts/editor.tcl scripts/energyLevels.tcl])
102TEA_ADD_TCL_SOURCES([scripts/field.tcl scripts/field3dresult.tcl])
103TEA_ADD_TCL_SOURCES([scripts/filexfer.tcl scripts/gauge.tcl])
104TEA_ADD_TCL_SOURCES([scripts/getopts.tcl scripts/grab.tcl])
105TEA_ADD_TCL_SOURCES([scripts/groupentry.tcl scripts/icons.tcl])
106TEA_ADD_TCL_SOURCES([scripts/image.tcl scripts/imageentry.tcl])
107TEA_ADD_TCL_SOURCES([scripts/imageresult.tcl])
108TEA_ADD_TCL_SOURCES([scripts/integerentry.tcl scripts/loader.tcl])
109TEA_ADD_TCL_SOURCES([scripts/mainwin.tcl scripts/mesh.tcl])
110TEA_ADD_TCL_SOURCES([scripts/molvisviewer.tcl])
111TEA_ADD_TCL_SOURCES([scripts/meshresult.tcl scripts/moleculeViewer.tcl])
112TEA_ADD_TCL_SOURCES([scripts/nanovisviewer.tcl scripts/notebook.tcl])
113TEA_ADD_TCL_SOURCES([scripts/numberentry.tcl scripts/page.tcl])
114TEA_ADD_TCL_SOURCES([scripts/pager.tcl scripts/panes.tcl])
115TEA_ADD_TCL_SOURCES([scripts/postern.tcl scripts/progress.tcl])
116TEA_ADD_TCL_SOURCES([scripts/radiodial.tcl scripts/resources.tcl])
117TEA_ADD_TCL_SOURCES([scripts/resultset.tcl scripts/resultviewer.tcl])
118TEA_ADD_TCL_SOURCES([scripts/scroller.tcl scripts/sequence.tcl])
119TEA_ADD_TCL_SOURCES([scripts/sequenceresult.tcl scripts/service.tcl])
120TEA_ADD_TCL_SOURCES([scripts/spectrum.tcl scripts/spinint.tcl])
121TEA_ADD_TCL_SOURCES([scripts/switch.tcl scripts/table.tcl])
122TEA_ADD_TCL_SOURCES([scripts/tempgauge.tcl scripts/textentry.tcl])
123TEA_ADD_TCL_SOURCES([scripts/textresult.tcl scripts/tool.tcl])
124TEA_ADD_TCL_SOURCES([scripts/tooltip.tcl scripts/tuples.tcl])
125TEA_ADD_TCL_SOURCES([scripts/units.tcl scripts/valueresult.tcl])
126TEA_ADD_TCL_SOURCES([scripts/xyresult.tcl])
127
128#--------------------------------------------------------------------
129# __CHANGE__
130# A few miscellaneous platform-specific items:
131#
132# Define a special symbol for Windows (BUILD_Rappture in this case) so
133# that we create the export library with the dll.
134#
135# Windows creates a few extra files that need to be cleaned up.
136# You can add more files to clean if your extension creates any extra
137# files.
138#
139# TEA_ADD_* any platform specific compiler/build info here.
140#--------------------------------------------------------------------
141
142if test "${TEA_PLATFORM}" = "windows" ; then
143    AC_DEFINE(BUILD_Rappture, 1, [Build windows export dll])
144    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch *.manifest"
145    TEA_ADD_SOURCES([RpWinResource.c])
146    TEA_ADD_LIBS([-LIBPATH:${TCL_EXEC_PREFIX}/lib])
147    TEA_ADD_LIBS([BLTlite24.LIB])
148    TEA_ADD_LIBS([psapi.lib])
149    TEA_ADD_CFLAGS([-D_CRT_SECURE_NO_DEPRECATE -wd4996])
150else
151    CLEANFILES=""
152    TEA_ADD_LIBS([-L${TCL_EXEC_PREFIX}/lib])
153    TEA_ADD_LIBS([-lBLTlite24])
154fi
155AC_SUBST(CLEANFILES)
156
157#--------------------------------------------------------------------
158# __CHANGE__
159# Choose which headers you need.  Extension authors should try very
160# hard to only rely on the Tcl public header files.  Internal headers
161# contain private data structures and are subject to change without
162# notice.
163# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
164#--------------------------------------------------------------------
165
166TEA_PUBLIC_TCL_HEADERS
167#TEA_PRIVATE_TCL_HEADERS
168
169TEA_PUBLIC_TK_HEADERS
170#TEA_PRIVATE_TK_HEADERS
171#TEA_PATH_X
172
173#--------------------------------------------------------------------
174# Check whether --enable-threads or --disable-threads was given.
175# This auto-enables if Tcl was compiled threaded.
176#--------------------------------------------------------------------
177
178TEA_ENABLE_THREADS
179
180#--------------------------------------------------------------------
181# The statement below defines a collection of symbols related to
182# building as a shared library instead of a static library.
183#--------------------------------------------------------------------
184
185TEA_ENABLE_SHARED
186
187#--------------------------------------------------------------------
188# This macro figures out what flags to use with the compiler/linker
189# when building shared/static debug/optimized objects.  This information
190# can be taken from the tclConfig.sh file, but this figures it all out.
191#--------------------------------------------------------------------
192
193TEA_CONFIG_CFLAGS
194
195#--------------------------------------------------------------------
196# Set the default compiler switches based on the --enable-symbols option.
197#--------------------------------------------------------------------
198
199TEA_ENABLE_SYMBOLS
200
201#--------------------------------------------------------------------
202# Everyone should be linking against the Tcl stub library.  If you
203# can't for some reason, remove this definition.  If you aren't using
204# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
205# link against the non-stubbed Tcl library.  Add Tk too if necessary.
206#--------------------------------------------------------------------
207
208AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
209#AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
210
211#--------------------------------------------------------------------
212# This macro generates a line to use when building a library.  It
213# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
214# and TEA_LOAD_TCLCONFIG macros above.
215#--------------------------------------------------------------------
216
217TEA_MAKE_LIB
218
219#--------------------------------------------------------------------
220# Determine the name of the tclsh and/or wish executables in the
221# Tcl and Tk build directories or the location they were installed
222# into. These paths are used to support running test cases only,
223# the Makefile should not be making use of these paths to generate
224# a pkgIndex.tcl file or anything else at extension build time.
225#--------------------------------------------------------------------
226
227TEA_PROG_TCLSH
228#TEA_PROG_WISH
229
230
231#--------------------------------------------------------------------
232# Look for bltInt.h on the normal include path.  If not found, look
233# for it in the --with-blt directory.
234#--------------------------------------------------------------------
235AC_MSG_CHECKING([for bltInt.h])
236BLT_SRC_DIR=""
237if test "x$blt_source_dir" != "x" ; then
238  #
239  # Verify that a tclConfig.sh file exists in the directory specified
240  # by --with-blt.
241  #
242  if test -r "$blt_source_dir/bltInt.h" ; then
243    BLT_SRC_DIR="$blt_source_dir"
244  elif test -r "$blt_source_dir/src/bltInt.h" ; then
245    BLT_SRC_DIR="$blt_source_dir/src"
246  fi
247else
248  #
249  # Otherwise, search for the bltInt.h include file...
250  # 1. Search previously named locations.
251  #
252  for dir in \
253   $prefix \
254   $exec_prefix
255  do
256    if test -r "$dir/bltInt.h" ; then
257      BLT_SRC_DIR="$dir"
258      break
259    elif test -r "$dir/include/bltInt.h" ; then
260      BLT_SRC_DIR="$dir/include"
261      break
262    fi
263  done
264  #
265  #  2. Search source directories.
266  #
267  if test "x$BLT_SRC_DIR" = "x" ; then
268    for dir in \
269     `ls -dr ../blt[[2-3]].[[0-9]]* 2>/dev/null` \
270     ../blt \
271     `ls -dr ../../blt[[2-3]].[[0-9]]* 2>/dev/null` \
272     ../../blt \
273     `ls -dr ../../../blt[[2-3]].[[0-9]]* 2>/dev/null` \
274     ../../../blt \
275     `ls -dr c:/opt/blt[[2-3]].[[0-9]]* 2>/dev/null` \
276     c\:/opt/blt
277    do
278      if test -r "$dir/src/bltInt.h" ; then
279        BLT_SRC_DIR="$dir/src"
280        break
281      fi
282    done
283  fi
284fi
285AC_MSG_RESULT([${BLT_SRC_DIR}])
286
287if test "x$BLT_SRC_DIR" = "x" ; then
288  echo "can't find BLT include file \"bltInt.h\""
289  echo "use --with-blt=DIR to specify the location of the BLT sources"
290  exit 1
291fi
292
293AC_SUBST(BLT_SRC_DIR)
294
295PATCHLEVEL=`${TCLSH_PROG} tclconfig/patchlevel.tcl`
296EXACT_VERSION=${MAJOR_VERSION}.${MINOR_VERSION}-${PATCHLEVEL}
297NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
298
299AC_SUBST(PACKAGE)
300AC_SUBST(VERSION)
301AC_SUBST(PATCHLEVEL)
302AC_SUBST(EXACT_VERSION)
303AC_SUBST(NODOT_VERSION)
304
305
306#--------------------------------------------------------------------
307# Finally, substitute all of the various values into the Makefile.
308# You may alternatively have a special pkgIndex.tcl.in or other files
309# which require substituting th AC variables in.  Include these here.
310#--------------------------------------------------------------------
311
312AC_CONFIG_SUBDIRS( vizservers )
313AC_OUTPUT([Makefile pkgIndex.tcl init.tcl])
Note: See TracBrowser for help on using the repository browser.