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