Mercurial > flash_v2
comparison host/aclocal.m4 @ 283:f58bc1b2c2bc
Reorganization of the host-side autoconfiscation support, and a couple
of minor bug fixes. The main goal is to support per-package host-side
software in addition to the generic host-side tools. For example, the
synthetic target HAL and device driver packages can now have host
subdirectories with support code.
| author | bartv |
|---|---|
| date | Sun, 11 Aug 2002 21:40:50 +0000 |
| parents | 511f4dc167f6 |
| children |
comparison
equal
deleted
inserted
replaced
| 282:a29ee6c2dd3c | 283:f58bc1b2c2bc |
|---|---|
| 1 dnl aclocal.m4 generated automatically by aclocal 1.4 | 1 dnl aclocal.m4 generated automatically by aclocal 1.4-p5 |
| 2 | 2 |
| 3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | 3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. |
| 4 dnl This file is free software; the Free Software Foundation | 4 dnl This file is free software; the Free Software Foundation |
| 5 dnl gives unlimited permission to copy and/or distribute it, | 5 dnl gives unlimited permission to copy and/or distribute it, |
| 6 dnl with or without modifications, as long as this notice is preserved. | 6 dnl with or without modifications, as long as this notice is preserved. |
| 7 | 7 |
| 8 dnl This program is distributed in the hope that it will be useful, | 8 dnl This program is distributed in the hope that it will be useful, |
| 14 dnl process that with autoconf. | 14 dnl process that with autoconf. |
| 15 dnl ==================================================================== | 15 dnl ==================================================================== |
| 16 dnl | 16 dnl |
| 17 dnl acinclude.m4 | 17 dnl acinclude.m4 |
| 18 dnl | 18 dnl |
| 19 dnl Various autoconf macros that are shared between different | |
| 20 dnl eCos packages. | |
| 21 dnl | |
| 22 dnl ==================================================================== | 19 dnl ==================================================================== |
| 23 dnl####COPYRIGHTBEGIN#### | 20 dnl ####ECOSHOSTGPLCOPYRIGHTBEGIN#### |
| 24 dnl | |
| 25 dnl ---------------------------------------------------------------------------- | 21 dnl ---------------------------------------------------------------------------- |
| 26 dnl Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc. | 22 dnl Copyright (C) 2002 Bart Veer |
| 27 dnl | 23 dnl |
| 28 dnl This file is part of the eCos host tools. | 24 dnl This file is part of the eCos host tools. |
| 29 dnl | 25 dnl |
| 30 dnl This program is free software; you can redistribute it and/or modify it | 26 dnl This program is free software; you can redistribute it and/or modify it |
| 31 dnl under the terms of the GNU General Public License as published by the Free | 27 dnl under the terms of the GNU General Public License as published by the Free |
| 40 dnl You should have received a copy of the GNU General Public License along with | 36 dnl You should have received a copy of the GNU General Public License along with |
| 41 dnl this program; if not, write to the Free Software Foundation, Inc., | 37 dnl this program; if not, write to the Free Software Foundation, Inc., |
| 42 dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 38 dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 43 dnl | 39 dnl |
| 44 dnl ---------------------------------------------------------------------------- | 40 dnl ---------------------------------------------------------------------------- |
| 45 dnl | 41 dnl ####ECOSHOSTGPLCOPYRIGHTEND#### |
| 46 dnl####COPYRIGHTEND#### | |
| 47 dnl ==================================================================== | 42 dnl ==================================================================== |
| 48 dnl#####DESCRIPTIONBEGIN#### | 43 dnl#####DESCRIPTIONBEGIN#### |
| 49 dnl | 44 dnl |
| 50 dnl Author(s): bartv | 45 dnl Author(s): bartv |
| 51 dnl Contact(s): bartv | 46 dnl Contact(s): bartv |
| 52 dnl Date: 1998/12/16 | 47 dnl Date: 2002/08/03 |
| 53 dnl Version: 0.01 | 48 dnl Version: 0.01 |
| 54 dnl | 49 dnl |
| 55 dnl####DESCRIPTIONEND#### | 50 dnl####DESCRIPTIONEND#### |
| 56 dnl ==================================================================== | 51 dnl ==================================================================== |
| 57 | 52 |
| 58 dnl ==================================================================== | 53 dnl Access shared macros. |
| 59 dnl The AM_INIT_AUTOMAKE() will define a symbol VERSION for the | 54 dnl AM_CONDITIONAL needs to be mentioned here or else aclocal does not |
| 60 dnl package's version number. Unfortunately this symbol is rather | 55 dnl incorporate the macro into aclocal.m4 |
| 61 dnl hard to share if several different packages are involved, so this | 56 sinclude(../acsupport/acinclude.m4) |
| 62 dnl macro is used to define an alternative symbol | |
| 63 | 57 |
| 64 AC_DEFUN(CYG_AC_SUBST_VERSION,[ | 58 # Define a conditional. |
| 65 AC_REQUIRE([AM_INIT_AUTOMAKE]) | |
| 66 ifelse($#,1,,AC_MSG_ERROR([Invalid number of arguments passed to CYG AC_SUBST_VERSION])) | |
| 67 AC_DEFINE_UNQUOTED($1, "$VERSION") | |
| 68 ]) | |
| 69 | 59 |
| 70 dnl ==================================================================== | 60 AC_DEFUN([AM_CONDITIONAL], |
| 71 dnl Provide support for an automake conditional MSVC. Also set a | 61 [AC_SUBST($1_TRUE) |
| 72 dnl variable MSVC to true or false, which may help other tests. | 62 AC_SUBST($1_FALSE) |
| 73 | 63 if $2; then |
| 74 AC_DEFUN(CYG_AC_PROG_MSVC,[ | 64 $1_TRUE= |
| 75 AC_REQUIRE([AC_PROG_CC]) | 65 $1_FALSE='#' |
| 76 AC_REQUIRE([AC_PROG_CXX]) | |
| 77 | |
| 78 AC_MSG_CHECKING("for Visual C++") | |
| 79 MSVC="no"; | |
| 80 if test "${CC}" = "cl" ; then | |
| 81 MSVC="yes" | |
| 82 fi | |
| 83 if test "${CXX}" = "cl" ; then | |
| 84 MSVC="yes" | |
| 85 fi | |
| 86 AM_CONDITIONAL(MSVC, test "${MSVC}" = "yes") | |
| 87 AC_MSG_RESULT(${MSVC}) | |
| 88 ]) | |
| 89 | |
| 90 dnl ==================================================================== | |
| 91 dnl Set up sensible flags for the various different compilers. This | |
| 92 dnl is achieved by manipulating AM-CFLAGS and AM-CXXFLAGS via a subst, | |
| 93 dnl plus undoing the setting of CFLAGS and CXXFLAGS done by | |
| 94 dnl the AC_PROC_CC and AC_PROG_CXX macros. Note that this relies | |
| 95 dnl on knowing about the internals of those macros. | |
| 96 dnl | |
| 97 dnl There is no point in checking the cache, this macro does | |
| 98 dnl not do any feature tests. | |
| 99 dnl | |
| 100 dnl The VC++ variant might benefit from -Za, but the header files | |
| 101 dnl shipped with the compiler are incompatible with this option. | |
| 102 | |
| 103 AC_DEFUN(CYG_AC_PROG_STANDARD_COMPILER_FLAGS, [ | |
| 104 AC_REQUIRE([AC_PROG_CC]) | |
| 105 AC_REQUIRE([AC_PROG_CXX]) | |
| 106 AC_REQUIRE([CYG_AC_PROG_MSVC]) | |
| 107 | |
| 108 AC_MSG_CHECKING("the default compiler flags") | |
| 109 | |
| 110 dnl Add a user-settable flag to control whether or debugging info is | |
| 111 dnl incorporated at compile-time. | |
| 112 dnl | |
| 113 dnl NOTE: there may also have to be a flag to control whether or | |
| 114 dnl the VC++ multi-threading flags are enabled. | |
| 115 cygflags_enable_debug="no" | |
| 116 AC_ARG_ENABLE(debug,[ --enable-debug do a debug rather than a release build], | |
| 117 [case "${enableval}" in | |
| 118 yes) cygflags_enable_debug="yes" ;; | |
| 119 *) cygflags_enable_debug="no" ;; | |
| 120 esac]) | |
| 121 | |
| 122 dnl For VC++ builds also provide a flag for ANSI vs. unicode builds. | |
| 123 dnl For now this does not actually affect the compiler flags. | |
| 124 cygflags_enable_ansi="no" | |
| 125 if test "${MSVC}" = "yes" ; then | |
| 126 AC_ARG_ENABLE(ansi,[ --enable-ansi Do an ANSI rather than a unicode build], | |
| 127 [case "${enableval}" in | |
| 128 yes) cygflags_enable_ansi="yes" ;; | |
| 129 *) cygflags_enable_ansi="no" ;; | |
| 130 esac]) | |
| 131 fi | |
| 132 | |
| 133 dnl Now we know what the user is after. | |
| 134 if test "${GCC}" = "yes" ; then | |
| 135 cyg_CFLAGS="-pipe -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs" | |
| 136 cyg_CXXFLAGS="-pipe -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Woverloaded-virtual" | |
| 137 elif test "${MSVC}" = "yes" ; then | |
| 138 cyg_CFLAGS="-nologo -W3" | |
| 139 cyg_CXXFLAGS="-nologo -W3 -GR -GX" | |
| 140 else | |
| 141 AC_MSG_ERROR("default flags for ${CC} are not known") | |
| 142 fi | |
| 143 | |
| 144 dnl Choose between debugging and optimization. | |
| 145 if test "${cygflags_enable_debug}" = "yes" ; then | |
| 146 if test "${GCC}" = "yes" ; then | |
| 147 cyg_CFLAGS="${cyg_CFLAGS} -g -O0" | |
| 148 cyg_CXXFLAGS="${cyg_CXXFLAGS} -g -O0" | |
| 149 elif test "${MSVC}" = "yes" ; then | |
| 150 cyg_CFLAGS="${cyg_CFLAGS} -MDd -Zi" | |
| 151 cyg_CXXFLAGS="${cyg_CXXFLAGS} -MDd -Zi" | |
| 152 fi | |
| 153 else | |
| 154 if test "${GCC}" = "yes" ; then | |
| 155 cyg_CFLAGS="${cyg_CFLAGS} -O0" | |
| 156 cyg_CXXFLAGS="${cyg_CXXFLAGS} -O0" | |
| 157 elif test "${MSVC}" = "yes" ; then | |
| 158 cyg_CFLAGS="${cyg_CFLAGS} -MD -O2" | |
| 159 cyg_CXXFLAGS="${cyg_CXXFLAGS} -MD -O2" | |
| 160 fi | |
| 161 fi | |
| 162 | |
| 163 CFLAGS="${ac_save_CFLAGS}" | |
| 164 CXXFLAGS="${ac_save_CXXFLAGS}" | |
| 165 AC_SUBST(cyg_CFLAGS) | |
| 166 AC_SUBST(cyg_CXXFLAGS) | |
| 167 AC_MSG_RESULT(done) | |
| 168 ]) | |
| 169 | |
| 170 dnl -------------------------------------------------------------------- | |
| 171 dnl User-settable options for assertions and tracing. | |
| 172 dnl | |
| 173 dnl The settable options are: | |
| 174 dnl --disable-asserts | |
| 175 dnl --disable-preconditions | |
| 176 dnl --disable-postconditions | |
| 177 dnl --disable-invariants | |
| 178 dnl --disable-loopinvariants | |
| 179 dnl --disable-tracing | |
| 180 dnl --disable-fntracing | |
| 181 | |
| 182 AC_DEFUN(CYG_AC_ARG_INFRASTRUCTURE, [ | |
| 183 | |
| 184 AC_REQUIRE([CYG_AC_PROG_STANDARD_COMPILER_FLAGS]) | |
| 185 | |
| 186 if test "${cygflags_enable_debug}" = "yes" ; then | |
| 187 cyginfra_asserts=yes | |
| 188 cyginfra_preconditions=yes | |
| 189 cyginfra_postconditions=yes | |
| 190 cyginfra_invariants=yes | |
| 191 cyginfra_loopinvariants=yes | |
| 192 cyginfra_tracing=yes | |
| 193 cyginfra_fntracing=yes | |
| 194 else | 66 else |
| 195 cyginfra_asserts=no | 67 $1_TRUE='#' |
| 196 cyginfra_preconditions=no | 68 $1_FALSE= |
| 197 cyginfra_postconditions=no | 69 fi]) |
| 198 cyginfra_invariants=no | |
| 199 cyginfra_loopinvariants=no | |
| 200 cyginfra_tracing=no | |
| 201 cyginfra_fntracing=no | |
| 202 fi | |
| 203 | |
| 204 AC_ARG_ENABLE(asserts,[ --disable-asserts disable all assertions], | |
| 205 [case "${enableval}" in | |
| 206 yes) cyginfra_asserts=yes ;; | |
| 207 no) cyginfra_asserts=no ;; | |
| 208 *) AC_MSG_ERROR([bad value ${enableval} for disable-asserts option]) ;; | |
| 209 esac]) | |
| 210 if test "${cyginfra_asserts}" = "yes"; then | |
| 211 AC_DEFINE(CYGDBG_USE_ASSERTS) | |
| 212 fi | |
| 213 | |
| 214 AC_ARG_ENABLE(preconditions, [ --disable-preconditions disable a subset of the assertions], | |
| 215 [case "${enableval}" in | |
| 216 yes) cyginfra_preconditions=yes ;; | |
| 217 no) cyginfra_preconditions=no ;; | |
| 218 *) AC_MSG_ERROR([bad value ${enableval} for disable-preconditions option]) ;; | |
| 219 esac]) | |
| 220 if test "${cyginfra_preconditions}" = "yes"; then | |
| 221 AC_DEFINE(CYGDBG_INFRA_DEBUG_PRECONDITIONS) | |
| 222 fi | |
| 223 | |
| 224 AC_ARG_ENABLE(postconditions, [ --disable-postconditions disable a subset of the assertions], | |
| 225 [case "${enableval}" in | |
| 226 yes) cyginfra_postconditions=yes ;; | |
| 227 no) cyginfra_postconditions=no ;; | |
| 228 *) AC_MSG_ERROR([bad value ${enableval} for disable-postconditions option]) ;; | |
| 229 esac]) | |
| 230 if test "${cyginfra_postconditions}" = "yes"; then | |
| 231 AC_DEFINE(CYGDBG_INFRA_DEBUG_POSTCONDITIONS) | |
| 232 fi | |
| 233 | |
| 234 AC_ARG_ENABLE(invariants, [ --disable-invariants disable a subset of the assertions], | |
| 235 [case "${enableval}" in | |
| 236 yes) cyginfra_invariants=yes ;; | |
| 237 no) cyginfra_invariants=no ;; | |
| 238 *) AC_MSG_ERROR([bad value ${enableval} for disable-invariants option]) ;; | |
| 239 esac]) | |
| 240 if test "${cyginfra_invariants}" = "yes"; then | |
| 241 AC_DEFINE(CYGDBG_INFRA_DEBUG_INVARIANTS) | |
| 242 fi | |
| 243 | |
| 244 AC_ARG_ENABLE(loopinvariants, [ --disable-loopinvariants disable a subset of the assertions], | |
| 245 [case "${enableval}" in | |
| 246 yes) cyginfra_loopinvariants=yes ;; | |
| 247 no) cyginfra_loopinvariants=no ;; | |
| 248 *) AC_MSG_ERROR([bad value ${enableval} for disable-loopinvariants option]) ;; | |
| 249 esac]) | |
| 250 if test "${cyginfra_loopinvariants}" = "yes"; then | |
| 251 AC_DEFINE(CYGDBG_INFRA_DEBUG_LOOP_INVARIANTS) | |
| 252 fi | |
| 253 | |
| 254 AC_ARG_ENABLE(tracing,[ --disable-tracing disable tracing], | |
| 255 [case "${enableval}" in | |
| 256 yes) cyginfra_tracing=yes ;; | |
| 257 no) cyginfra_tracing=no ;; | |
| 258 *) AC_MSG_ERROR([bad value ${enableval} for disable-tracing option]) ;; | |
| 259 esac]) | |
| 260 if test "${cyginfra_tracing}" = "yes"; then | |
| 261 AC_DEFINE(CYGDBG_USE_TRACING) | |
| 262 fi | |
| 263 | |
| 264 AC_ARG_ENABLE(fntracing,[ --disable-fntracing disable function entry/exit tracing], | |
| 265 [case "${enableval}" in | |
| 266 yes) cyginfra_fntracing=yes ;; | |
| 267 no) cyginfra_fntracing=no ;; | |
| 268 *) AC_MSG_ERROR([bad value ${enableval} for disable-fntracing option]) ;; | |
| 269 esac]) | |
| 270 if test "${cyginfra_fntracing}" = "yes"; then | |
| 271 AC_DEFINE(CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS) | |
| 272 fi | |
| 273 | |
| 274 ]) | |
| 275 | |
| 276 dnl ==================================================================== | |
| 277 dnl Inspired by KDE's autoconfig | |
| 278 dnl This macro takes three Arguments like this: | |
| 279 dnl AC_FIND_FILE(foo.h, $incdirs, incdir) | |
| 280 dnl the filename to look for, the list of paths to check and | |
| 281 dnl the variable with the result. | |
| 282 | |
| 283 AC_DEFUN(AC_FIND_FILE, | |
| 284 [ | |
| 285 $3=NO | |
| 286 for i in $2; | |
| 287 do | |
| 288 for j in $1; | |
| 289 do | |
| 290 if test -r "$i/$j"; then | |
| 291 $3=$i | |
| 292 break 2 | |
| 293 fi | |
| 294 done | |
| 295 done | |
| 296 ]) | |
| 297 | |
| 298 | |
| 299 dnl -------------------------------------------------------------------- | |
| 300 dnl Convert a cygwin pathname to something acceptable to VC++ (but | |
| 301 dnl still invoked from bash and cygwin's make). This means using | |
| 302 dnl the cygpath utility and then translating any backslashes into | |
| 303 dnl forward slashes to avoid confusing make. | |
| 304 | |
| 305 AC_DEFUN(CYG_AC_MSVC_PATH, [ | |
| 306 AC_REQUIRE([CYG_AC_PROG_MSVC]) | |
| 307 ifelse($#, 1, , AC_MSG_ERROR("Invalid number of arguments passed to CYG AC_MSVC_PATH")) | |
| 308 | |
| 309 if test "${MSVC}" = "yes" ; then | |
| 310 $1=`cygpath -w ${$1} | tr \\\\\\\\ /` | |
| 311 fi | |
| 312 ]) | |
| 313 | |
| 314 | |
| 315 dnl -------------------------------------------------------------------- | |
| 316 dnl Work out details of the Tcl installation that should be used. | |
| 317 dnl This adds two command-line options, --with-tcl=<prefix> to | |
| 318 dnl specify the Tcl install directory, and --with-tcl-version=<vsn> | |
| 319 dnl to control which version of Tcl should be used. | |
| 320 dnl | |
| 321 dnl On Unix systems and under cygwin there should be a file | |
| 322 dnl $(tcl_prefix)/lib/tclConfig.sh containing all the information | |
| 323 dnl needed for Tcl. This file are consulted and the appropriate | |
| 324 dnl variables extracted. | |
| 325 dnl | |
| 326 dnl To confuse matters, subtly different naming conventions are used | |
| 327 dnl under Unix and NT. Under Unix the Tcl library will be called | |
| 328 dnl libtcl8.0.a, libtcl8.1.a, etc. with a dot between the major and | |
| 329 dnl minor version. Under NT (including cygwin) the library will be | |
| 330 dnl called tcl80.lib, dnl tcl81.lib, libtcl80.a, libtcl81.a, etc. | |
| 331 dnl without a dot. | |
| 332 dnl | |
| 333 dnl The macro should really assume that it is running inside devo, | |
| 334 dnl with tcl and tcl8.1 directories present and already configured. | |
| 335 dnl This is tricky for a number of reasons, including confusion about | |
| 336 dnl the meaning of top_srcdir. | |
| 337 dnl | |
| 338 dnl This macro defines four new shell variables which will be | |
| 339 dnl substituted (typically into Makefile.in): | |
| 340 dnl | |
| 341 dnl cyg_ac_tcl_version - the version of Tcl that is to be used | |
| 342 dnl cyg_ac_tcl_incdir - location of <tcl.h> etc al | |
| 343 dnl cyg_ac_tcl_libdir - location of libtcl.a/tcl.lib etc. | |
| 344 dnl cyg_ac_tcl_libs - all of the libraries that are needed for Tcl | |
| 345 | |
| 346 AC_DEFUN(CYG_AC_PATH_TCL, [ | |
| 347 | |
| 348 AC_REQUIRE([CYG_AC_PROG_MSVC]) | |
| 349 AC_REQUIRE([AC_CYGWIN]) | |
| 350 | |
| 351 dnl Look for the version of Tcl. If none is specified, default to | |
| 352 dnl 8.0 under VC++ and cygwin, nothing under Unix. A version has to be | |
| 353 dnl specified under NT because there is no symbolic link from libtcl.a | |
| 354 dnl to whatever happens to be the most recent installed version. | |
| 355 | |
| 356 AC_MSG_CHECKING(for Tcl version) | |
| 357 AC_ARG_WITH(tcl-version,[ --with-tcl-version=<vsn> version of Tcl to be used],[ | |
| 358 cyg_ac_tcl_version=${with_tcl_version} | |
| 359 ],[ | |
| 360 if test "${MSVC}" = "yes" ; then | |
| 361 cyg_ac_tcl_version=80 | |
| 362 else | |
| 363 if test "${ac_cv_cygwin}" = "yes" ; then | |
| 364 cyg_ac_tcl_version=80 | |
| 365 else | |
| 366 cyg_ac_tcl_version="" | |
| 367 fi | |
| 368 fi | |
| 369 ]) | |
| 370 AC_MSG_RESULT(${cyg_ac_tcl_version}) | |
| 371 AC_SUBST(cyg_ac_tcl_version) | |
| 372 | |
| 373 dnl Where is the Tcl installation? By default assume Tcl is already | |
| 374 dnl installed in the same place as the eCos host-side. | |
| 375 | |
| 376 AC_ARG_WITH(tcl,[ --with-tcl-header=<path> location of Tcl header]) | |
| 377 AC_ARG_WITH(tcl,[ --with-tcl-lib=<path> location of Tcl libraries]) | |
| 378 AC_ARG_WITH(tcl,[ --with-tcl=<path> location of Tcl header and libraries]) | |
| 379 | |
| 380 AC_MSG_CHECKING(for Tcl installation) | |
| 381 | |
| 382 dnl If using VC++ then there are no sensible default directories | |
| 383 dnl to search for a Tcl installation. Instead the user must | |
| 384 dnl supply either --with-tcl, or both --with-tcl-header and | |
| 385 dnl --with-tcl-lib. | |
| 386 dnl | |
| 387 dnl Also when using VC++ there is no tclConfig.sh file to | |
| 388 dnl consult about which libraries are needed. Instead that | |
| 389 dnl information is hard-wired here. | |
| 390 | |
| 391 if test "${MSVC}" = "yes" ; then | |
| 392 if test "${with_tcl_header+set}" = set; then | |
| 393 cyg_ac_tcl_incdir=${with_tcl_header} | |
| 394 else | |
| 395 if test "${with_tcl+set}" = set; then | |
| 396 cyg_ac_tcl_incdir="${with_tcl}/include" | |
| 397 else | |
| 398 AC_MSG_ERROR(You must specify a Tcl installation with either --with-tcl=<path> or --with-tcl-header=<path>) | |
| 399 fi | |
| 400 fi | |
| 401 if test "${with_tcl_lib+set}" = set; then | |
| 402 cyg_ac_tcl_libdir=${with_tcl_lib} | |
| 403 else | |
| 404 if test "${with_tcl+set}" = set; then | |
| 405 cyg_ac_tcl_libdir="${with_tcl}/lib" | |
| 406 else | |
| 407 AC_MSG_ERROR(You must specify a Tcl installation with either --with-tcl=<path> or --with-tcl-lib=<path>) | |
| 408 fi | |
| 409 fi | |
| 410 cyg_ac_tcl_libs="tcl${cyg_ac_tcl_version}.lib" | |
| 411 else | |
| 412 tcl_incdirs="${with_tcl_header} ${with_tcl}/include ${prefix}/include /usr/include/tcl$cyg_ac_tcl_version /usr/include" | |
| 413 AC_FIND_FILE(tcl.h, $tcl_incdirs, cyg_ac_tcl_incdir) | |
| 414 tcl_libdirs="${with_tcl_lib} ${with_tcl}/lib ${libdir} ${prefix}/lib /usr/lib/tcl$cyg_ac_tcl_version /usr/lib" | |
| 415 AC_FIND_FILE(tclConfig.sh, $tcl_libdirs, cyg_ac_tcl_libdir) | |
| 416 if test \! -r ${cyg_ac_tcl_libdir}/tclConfig.sh ; then | |
| 417 AC_MSG_ERROR(unable to locate Tcl config file tclConfig.sh) | |
| 418 else | |
| 419 . ${cyg_ac_tcl_libdir}/tclConfig.sh | |
| 420 cyg_ac_tcl_libs="-ltcl${cyg_ac_tcl_version} ${TCL_LIBS}" | |
| 421 fi | |
| 422 fi | |
| 423 | |
| 424 dnl Sanity check, make sure that there is a tcl.h header file. | |
| 425 dnl If not then there is no point in proceeding. | |
| 426 if test \! -r ${cyg_ac_tcl_incdir}/tcl.h ; then | |
| 427 AC_MSG_ERROR(unable to locate Tcl header file tcl.h) | |
| 428 fi | |
| 429 | |
| 430 if test "${MSVC}" = "yes" ; then | |
| 431 CYG_AC_MSVC_PATH(cyg_ac_tcl_incdir) | |
| 432 CYG_AC_MSVC_PATH(cyg_ac_tcl_libdir) | |
| 433 fi | |
| 434 | |
| 435 AC_MSG_RESULT(${cyg_ac_tcl_libdir}) | |
| 436 | |
| 437 AC_SUBST(cyg_ac_tcl_incdir) | |
| 438 AC_SUBST(cyg_ac_tcl_libdir) | |
| 439 AC_SUBST(cyg_ac_tcl_libs) | |
| 440 AC_SUBST(cyg_ac_tk_libs) | |
| 441 ]) | |
| 442 | |
| 443 | |
| 444 | |
| 445 | 70 |
| 446 # Do all the work for Automake. This macro actually does too much -- | 71 # Do all the work for Automake. This macro actually does too much -- |
| 447 # some checks are only needed if your package does certain things. | 72 # some checks are only needed if your package does certain things. |
| 448 # But this isn't really a big deal. | 73 # But this isn't really a big deal. |
| 449 | 74 |
| 450 # serial 1 | 75 # serial 1 |
| 451 | 76 |
| 452 dnl Usage: | 77 dnl Usage: |
| 453 dnl AM_INIT_AUTOMAKE(package,version, [no-define]) | 78 dnl AM_INIT_AUTOMAKE(package,version, [no-define]) |
| 454 | 79 |
| 455 AC_DEFUN(AM_INIT_AUTOMAKE, | 80 AC_DEFUN([AM_INIT_AUTOMAKE], |
| 456 [AC_REQUIRE([AC_PROG_INSTALL]) | 81 [AC_REQUIRE([AC_PROG_INSTALL]) |
| 457 PACKAGE=[$1] | 82 PACKAGE=[$1] |
| 458 AC_SUBST(PACKAGE) | 83 AC_SUBST(PACKAGE) |
| 459 VERSION=[$2] | 84 VERSION=[$2] |
| 460 AC_SUBST(VERSION) | 85 AC_SUBST(VERSION) |
| 478 | 103 |
| 479 # | 104 # |
| 480 # Check to make sure that the build environment is sane. | 105 # Check to make sure that the build environment is sane. |
| 481 # | 106 # |
| 482 | 107 |
| 483 AC_DEFUN(AM_SANITY_CHECK, | 108 AC_DEFUN([AM_SANITY_CHECK], |
| 484 [AC_MSG_CHECKING([whether build environment is sane]) | 109 [AC_MSG_CHECKING([whether build environment is sane]) |
| 485 # Just in case | 110 # Just in case |
| 486 sleep 1 | 111 sleep 1 |
| 487 echo timestamp > conftestfile | 112 echo timestamp > conftestfile |
| 488 # Do `set' in a subshell so we don't clobber the current shell's | 113 # Do `set' in a subshell so we don't clobber the current shell's |
| 519 rm -f conftest* | 144 rm -f conftest* |
| 520 AC_MSG_RESULT(yes)]) | 145 AC_MSG_RESULT(yes)]) |
| 521 | 146 |
| 522 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) | 147 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) |
| 523 dnl The program must properly implement --version. | 148 dnl The program must properly implement --version. |
| 524 AC_DEFUN(AM_MISSING_PROG, | 149 AC_DEFUN([AM_MISSING_PROG], |
| 525 [AC_MSG_CHECKING(for working $2) | 150 [AC_MSG_CHECKING(for working $2) |
| 526 # Run test in a subshell; some versions of sh will print an error if | 151 # Run test in a subshell; some versions of sh will print an error if |
| 527 # an executable is not found, even if stderr is redirected. | 152 # an executable is not found, even if stderr is redirected. |
| 528 # Redirect stdin to placate older versions of autoconf. Sigh. | 153 # Redirect stdin to placate older versions of autoconf. Sigh. |
| 529 if ($2 --version) < /dev/null > /dev/null 2>&1; then | 154 if ($2 --version) < /dev/null > /dev/null 2>&1; then |
| 533 $1="$3/missing $2" | 158 $1="$3/missing $2" |
| 534 AC_MSG_RESULT(missing) | 159 AC_MSG_RESULT(missing) |
| 535 fi | 160 fi |
| 536 AC_SUBST($1)]) | 161 AC_SUBST($1)]) |
| 537 | 162 |
| 538 # Define a conditional. | |
| 539 | |
| 540 AC_DEFUN(AM_CONDITIONAL, | |
| 541 [AC_SUBST($1_TRUE) | |
| 542 AC_SUBST($1_FALSE) | |
| 543 if $2; then | |
| 544 $1_TRUE= | |
| 545 $1_FALSE='#' | |
| 546 else | |
| 547 $1_TRUE='#' | |
| 548 $1_FALSE= | |
| 549 fi]) | |
| 550 | |
| 551 # Add --enable-maintainer-mode option to configure. | 163 # Add --enable-maintainer-mode option to configure. |
| 552 # From Jim Meyering | 164 # From Jim Meyering |
| 553 | 165 |
| 554 # serial 1 | 166 # serial 1 |
| 555 | 167 |
| 556 AC_DEFUN(AM_MAINTAINER_MODE, | 168 AC_DEFUN([AM_MAINTAINER_MODE], |
| 557 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) | 169 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
| 558 dnl maintainer-mode is disabled by default | 170 dnl maintainer-mode is disabled by default |
| 559 AC_ARG_ENABLE(maintainer-mode, | 171 AC_ARG_ENABLE(maintainer-mode, |
| 560 [ --enable-maintainer-mode enable make rules and dependencies not useful | 172 [ --enable-maintainer-mode enable make rules and dependencies not useful |
| 561 (and sometimes confusing) to the casual installer], | 173 (and sometimes confusing) to the casual installer], |
