source: trunk/packages/optimizer/src/configure.in

Last change on this file was 1052, checked in by gah, 16 years ago

fixes to optimizer build

File size: 8.2 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([RapptureOptimizer], [1.0])
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
63AC_PROG_F77
64AC_PROG_CC
65AC_PROG_CPP
66AC_PROG_CXX
67#-----------------------------------------------------------------------
68# __CHANGE__
69# Specify the C source files to compile in TEA_ADD_SOURCES,
70# public headers that need to be installed in TEA_ADD_HEADERS,
71# stub library C source files to compile in TEA_ADD_STUB_SOURCES,
72# and runtime Tcl library files in TEA_ADD_TCL_SOURCES.
73# This defines PKG(_STUB)_SOURCES, PKG(_STUB)_OBJECTS, PKG_HEADERS
74# and PKG_TCL_SOURCES.
75#-----------------------------------------------------------------------
76
77TEA_ADD_SOURCES([rp_optimizer.c rp_tcloptions.c rp_optimizer_tcl.c plugin_pgapack.c])
78TEA_ADD_HEADERS([])
79TEA_ADD_INCLUDES([-I\$(srcdir)/pgapack/pgapack/include])
80TEA_ADD_CFLAGS([-DWL=32])
81TEA_ADD_STUB_SOURCES([])
82# uncomment this and mkindex.tcl line in makefile when you are ready to
83# install tcl rappture library bindings
84#TEA_ADD_TCL_SOURCES([scripts/exec.tcl scripts/value.tcl init.tcl ../../tcl/scripts/library.tcl ../../tcl/scripts/result.tcl])
85TEA_ADD_TCL_SOURCES([])
86TEA_ADD_LIBS([-Lpgapack/pgapack/lib/linux -lpgaO])
87
88#--------------------------------------------------------------------
89# __CHANGE__
90# A few miscellaneous platform-specific items:
91#
92# Define a special symbol for Windows (BUILD_sample in this case) so
93# that we create the export library with the dll.
94#
95# Windows creates a few extra files that need to be cleaned up.
96# You can add more files to clean if your extension creates any extra
97# files.
98#
99# TEA_ADD_* any platform specific compiler/build info here.
100#--------------------------------------------------------------------
101
102if test "${TEA_PLATFORM}" = "windows" ; then
103    AC_DEFINE(BUILD_rappture, 1, [Build windows export dll])
104    CLEANFILES="*.lib *.dll *.exp *.ilk *.pdb vc*.pch"
105    TEA_ADD_LIBS(/LIBPATH:C:/Tcl/lib)
106    #TEA_ADD_SOURCES([win/winFile.c])
107    #TEA_ADD_INCLUDES([-I\"$(${CYGPATH} ${srcdir}/win)\"])
108else
109    CLEANFILES="*core *.o *.so *.a"
110    #TEA_ADD_SOURCES([unix/unixFile.c])
111    TEA_ADD_LIBS([-L${prefix}/lib])
112    if test "${libdir}" != "${prefix}/lib" ; then
113        TEA_ADD_LIBS([-L${libdir}])
114    fi
115fi
116AC_SUBST(CLEANFILES)
117
118#--------------------------------------------------------------------
119# __CHANGE__
120# Choose which headers you need.  Extension authors should try very
121# hard to only rely on the Tcl public header files.  Internal headers
122# contain private data structures and are subject to change without
123# notice.
124# This MUST be called after TEA_LOAD_TCLCONFIG / TEA_LOAD_TKCONFIG
125#--------------------------------------------------------------------
126
127TEA_PUBLIC_TCL_HEADERS
128#TEA_PRIVATE_TCL_HEADERS
129
130#TEA_PUBLIC_TK_HEADERS
131#TEA_PRIVATE_TK_HEADERS
132#TEA_PATH_X
133
134#--------------------------------------------------------------------
135# Check whether --enable-threads or --disable-threads was given.
136# This auto-enables if Tcl was compiled threaded.
137#--------------------------------------------------------------------
138
139TEA_ENABLE_THREADS
140
141#--------------------------------------------------------------------
142# The statement below defines a collection of symbols related to
143# building as a shared library instead of a static library.
144#--------------------------------------------------------------------
145
146TEA_ENABLE_SHARED
147
148#--------------------------------------------------------------------
149# This macro figures out what flags to use with the compiler/linker
150# when building shared/static debug/optimized objects.  This information
151# can be taken from the tclConfig.sh file, but this figures it all out.
152#--------------------------------------------------------------------
153
154TEA_CONFIG_CFLAGS
155
156#--------------------------------------------------------------------
157# Set the default compiler switches based on the --enable-symbols option.
158#--------------------------------------------------------------------
159
160TEA_ENABLE_SYMBOLS
161
162#--------------------------------------------------------------------
163# Everyone should be linking against the Tcl stub library.  If you
164# can't for some reason, remove this definition.  If you aren't using
165# stubs, you also need to modify the SHLIB_LD_LIBS setting below to
166# link against the non-stubbed Tcl library.  Add Tk too if necessary.
167#--------------------------------------------------------------------
168
169AC_DEFINE(USE_TCL_STUBS, 1, [Use Tcl stubs])
170#AC_DEFINE(USE_TK_STUBS, 1, [Use Tk stubs])
171
172#--------------------------------------------------------------------
173# This macro generates a line to use when building a library.  It
174# depends on values set by the TEA_ENABLE_SHARED, TEA_ENABLE_SYMBOLS,
175# and TEA_LOAD_TCLCONFIG macros above.
176#--------------------------------------------------------------------
177
178TEA_MAKE_LIB
179
180#--------------------------------------------------------------------
181# Determine the name of the tclsh and/or wish executables in the
182# Tcl and Tk build directories or the location they were installed
183# into. These paths are used to support running test cases only,
184# the Makefile should not be making use of these paths to generate
185# a pkgIndex.tcl file or anything else at extension build time.
186#--------------------------------------------------------------------
187
188TEA_PROG_TCLSH
189#TEA_PROG_WISH
190
191PATCHLEVEL=`${TCLSH_PROG} $srcdir/tclconfig/patchlevel.tcl`
192EXACT_VERSION=${MAJOR_VERSION}.${MINOR_VERSION}-${PATCHLEVEL}
193NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}
194
195AC_SUBST(PATCHLEVEL)
196AC_SUBST(EXACT_VERSION)
197AC_SUBST(NODOT_VERSION)
198
199AC_CONFIG_SUBDIRS( [pgapack] )
200
201#--------------------------------------------------------------------
202# Finally, substitute all of the various values into the Makefile.
203# You may alternatively have a special pkgIndex.tcl.in or other files
204# which require substituting th AC variables in.  Include these here.
205#--------------------------------------------------------------------
206
207AC_OUTPUT([Makefile pkgIndex.tcl])
Note: See TracBrowser for help on using the repository browser.