Mercurial > ecos
comparison host/aclocal.m4 @ 76:435cced73e2f ecos-v1_3_1-release
eCos v1.3.1 merged from eCos master repository on 2000-03-27-23:22:51-BST
| author | jlarmour |
|---|---|
| date | Tue, 28 Mar 2000 14:10:45 +0000 |
| parents | |
| children | a9ac27ec7abc |
comparison
equal
deleted
inserted
replaced
| 75:41bf073c0c32 | 76:435cced73e2f |
|---|---|
| 1 dnl aclocal.m4 generated automatically by aclocal 1.4 | |
| 2 | |
| 3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. | |
| 4 dnl This file is free software; the Free Software Foundation | |
| 5 dnl gives unlimited permission to copy and/or distribute it, | |
| 6 dnl with or without modifications, as long as this notice is preserved. | |
| 7 | |
| 8 dnl This program is distributed in the hope that it will be useful, | |
| 9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without | |
| 10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
| 11 dnl PARTICULAR PURPOSE. | |
| 12 | |
| 13 dnl Process this file with aclocal to get an aclocal.m4 file. Then | |
| 14 dnl process that with autoconf. | |
| 15 dnl ==================================================================== | |
| 16 dnl | |
| 17 dnl acinclude.m4 | |
| 18 dnl | |
| 19 dnl Various autoconf macros that are shared between different | |
| 20 dnl eCos packages. | |
| 21 dnl | |
| 22 dnl ==================================================================== | |
| 23 dnl####COPYRIGHTBEGIN#### | |
| 24 dnl | |
| 25 dnl ---------------------------------------------------------------------------- | |
| 26 dnl Copyright (C) 1998, 1999, 2000 Red Hat, Inc. | |
| 27 dnl | |
| 28 dnl This file is part of the eCos host tools. | |
| 29 dnl | |
| 30 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 | |
| 32 dnl Software Foundation; either version 2 of the License, or (at your option) | |
| 33 dnl any later version. | |
| 34 dnl | |
| 35 dnl This program is distributed in the hope that it will be useful, but WITHOUT | |
| 36 dnl ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
| 37 dnl FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
| 38 dnl more details. | |
| 39 dnl | |
| 40 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., | |
| 42 dnl 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
| 43 dnl | |
| 44 dnl ---------------------------------------------------------------------------- | |
| 45 dnl | |
| 46 dnl####COPYRIGHTEND#### | |
| 47 dnl ==================================================================== | |
| 48 dnl#####DESCRIPTIONBEGIN#### | |
| 49 dnl | |
| 50 dnl Author(s): bartv | |
| 51 dnl Contact(s): bartv | |
| 52 dnl Date: 1998/12/16 | |
| 53 dnl Version: 0.01 | |
| 54 dnl | |
| 55 dnl####DESCRIPTIONEND#### | |
| 56 dnl ==================================================================== | |
| 57 | |
| 58 dnl ==================================================================== | |
| 59 dnl The AM_INIT_AUTOMAKE() will define a symbol VERSION for the | |
| 60 dnl package's version number. Unfortunately this symbol is rather | |
| 61 dnl hard to share if several different packages are involved, so this | |
| 62 dnl macro is used to define an alternative symbol | |
| 63 | |
| 64 AC_DEFUN(CYG_AC_SUBST_VERSION,[ | |
| 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 | |
| 70 dnl ==================================================================== | |
| 71 dnl Provide support for an automake conditional MSVC. Also set a | |
| 72 dnl variable MSVC to true or false, which may help other tests. | |
| 73 | |
| 74 AC_DEFUN(CYG_AC_PROG_MSVC,[ | |
| 75 AC_REQUIRE([AC_PROG_CC]) | |
| 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 redefining CC and CXX. | |
| 93 dnl | |
| 94 dnl A better way of doing this sort of thing would be to detect | |
| 95 dnl arguments to add and remove to the set of compiler flags, and | |
| 96 dnl then update CFLAGS and CXXFLAGS (or even better, the AM | |
| 97 dnl versions of those flags?) | |
| 98 dnl | |
| 99 dnl There is no point in checking the cache, this macro does | |
| 100 dnl not do any feature tests. | |
| 101 dnl | |
| 102 dnl The VC++ variant might benefit from -Za, but the header files | |
| 103 dnl shipped with the compiler are incompatible with this option. | |
| 104 | |
| 105 AC_DEFUN(CYG_AC_PROG_STANDARD_COMPILER_FLAGS, [ | |
| 106 AC_REQUIRE([AC_PROG_CC]) | |
| 107 AC_REQUIRE([AC_PROG_CXX]) | |
| 108 AC_REQUIRE([CYG_AC_PROG_MSVC]) | |
| 109 | |
| 110 AC_MSG_CHECKING("the default compiler flags") | |
| 111 | |
| 112 dnl Add a user-settable flag to control whether or debugging info is | |
| 113 dnl incorporated at compile-time. | |
| 114 dnl | |
| 115 dnl NOTE: there may also have to be a flag to control whether or | |
| 116 dnl the VC++ multi-threading flags are enabled. | |
| 117 cygflags_enable_debug="no" | |
| 118 AC_ARG_ENABLE(debug,[ --enable-debug do a debug rather than a release build], | |
| 119 [case "${enableval}" in | |
| 120 yes) cygflags_enable_debug="yes" ;; | |
| 121 *) cygflags_enable_debug="no" ;; | |
| 122 esac]) | |
| 123 | |
| 124 dnl For VC++ builds also provide a flag for ANSI vs. unicode builds. | |
| 125 dnl For now this does not actually affect the compiler flags. | |
| 126 cygflags_enable_ansi="no" | |
| 127 if test "${MSVC}" = "yes" ; then | |
| 128 AC_ARG_ENABLE(ansi,[ --enable-ansi Do an ANSI rather than a unicode build], | |
| 129 [case "${enableval}" in | |
| 130 yes) cygflags_enable_ansi="yes" ;; | |
| 131 *) cygflags_enable_ansi="no" ;; | |
| 132 esac]) | |
| 133 fi | |
| 134 | |
| 135 if test "${GCC}" = "yes" ; then | |
| 136 CC="$CC -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs" | |
| 137 CXX="$CXX -Wall -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Woverloaded-virtual" | |
| 138 elif test "${MSVC}" = "yes" ; then | |
| 139 CC="$CC -nologo -W3" | |
| 140 CXX="$CXX -nologo -W3 -GR -GX" | |
| 141 if test "${cygflags_enable_debug}" = "yes" ; then | |
| 142 CC="$CC -MDd -Zi" | |
| 143 CXX="$CXX -MDd -Zi" | |
| 144 else | |
| 145 CC="$CC -MD -O2" | |
| 146 CXX="$CXX -MD -O2" | |
| 147 fi | |
| 148 else | |
| 149 AC_MSG_ERROR("default flags for ${CC} are not known") | |
| 150 fi | |
| 151 AC_MSG_RESULT(done) | |
| 152 ]) | |
| 153 | |
| 154 dnl -------------------------------------------------------------------- | |
| 155 dnl User-settable options for assertions and tracing. | |
| 156 dnl | |
| 157 dnl The settable options are: | |
| 158 dnl --disable-asserts | |
| 159 dnl --disable-preconditions | |
| 160 dnl --disable-postconditions | |
| 161 dnl --disable-invariants | |
| 162 dnl --disable-loopinvariants | |
| 163 dnl --disable-tracing | |
| 164 dnl --disable-fntracing | |
| 165 | |
| 166 AC_DEFUN(CYG_AC_ARG_INFRASTRUCTURE, [ | |
| 167 | |
| 168 AC_REQUIRE([CYG_AC_PROG_STANDARD_COMPILER_FLAGS]) | |
| 169 | |
| 170 if test "${cygflags_enable_debug}" = "yes" ; then | |
| 171 cyginfra_asserts=yes | |
| 172 cyginfra_preconditions=yes | |
| 173 cyginfra_postconditions=yes | |
| 174 cyginfra_invariants=yes | |
| 175 cyginfra_loopinvariants=yes | |
| 176 cyginfra_tracing=yes | |
| 177 cyginfra_fntracing=yes | |
| 178 else | |
| 179 cyginfra_asserts=no | |
| 180 cyginfra_preconditions=no | |
| 181 cyginfra_postconditions=no | |
| 182 cyginfra_invariants=no | |
| 183 cyginfra_loopinvariants=no | |
| 184 cyginfra_tracing=no | |
| 185 cyginfra_fntracing=no | |
| 186 fi | |
| 187 | |
| 188 AC_ARG_ENABLE(asserts,[ --disable-asserts disable all assertions], | |
| 189 [case "${enableval}" in | |
| 190 yes) cyginfra_asserts=yes ;; | |
| 191 no) cyginfra_asserts=no ;; | |
| 192 *) AC_MSG_ERROR([bad value ${enableval} for disable-asserts option]) ;; | |
| 193 esac]) | |
| 194 if test "${cyginfra_asserts}" = "yes"; then | |
| 195 AC_DEFINE(CYGDBG_USE_ASSERTS) | |
| 196 fi | |
| 197 | |
| 198 AC_ARG_ENABLE(preconditions, [ --disable-preconditions disable a subset of the assertions], | |
| 199 [case "${enableval}" in | |
| 200 yes) cyginfra_preconditions=yes ;; | |
| 201 no) cyginfra_preconditions=no ;; | |
| 202 *) AC_MSG_ERROR([bad value ${enableval} for disable-preconditions option]) ;; | |
| 203 esac]) | |
| 204 if test "${cyginfra_preconditions}" = "yes"; then | |
| 205 AC_DEFINE(CYGDBG_INFRA_DEBUG_PRECONDITIONS) | |
| 206 fi | |
| 207 | |
| 208 AC_ARG_ENABLE(postconditions, [ --disable-postconditions disable a subset of the assertions], | |
| 209 [case "${enableval}" in | |
| 210 yes) cyginfra_postconditions=yes ;; | |
| 211 no) cyginfra_postconditions=no ;; | |
| 212 *) AC_MSG_ERROR([bad value ${enableval} for disable-postconditions option]) ;; | |
| 213 esac]) | |
| 214 if test "${cyginfra_postconditions}" = "yes"; then | |
| 215 AC_DEFINE(CYGDBG_INFRA_DEBUG_POSTCONDITIONS) | |
| 216 fi | |
| 217 | |
| 218 AC_ARG_ENABLE(invariants, [ --disable-invariants disable a subset of the assertions], | |
| 219 [case "${enableval}" in | |
| 220 yes) cyginfra_invariants=yes ;; | |
| 221 no) cyginfra_invariants=no ;; | |
| 222 *) AC_MSG_ERROR([bad value ${enableval} for disable-invariants option]) ;; | |
| 223 esac]) | |
| 224 if test "${cyginfra_invariants}" = "yes"; then | |
| 225 AC_DEFINE(CYGDBG_INFRA_DEBUG_INVARIANTS) | |
| 226 fi | |
| 227 | |
| 228 AC_ARG_ENABLE(loopinvariants, [ --disable-loopinvariants disable a subset of the assertions], | |
| 229 [case "${enableval}" in | |
| 230 yes) cyginfra_loopinvariants=yes ;; | |
| 231 no) cyginfra_loopinvariants=no ;; | |
| 232 *) AC_MSG_ERROR([bad value ${enableval} for disable-loopinvariants option]) ;; | |
| 233 esac]) | |
| 234 if test "${cyginfra_loopinvariants}" = "yes"; then | |
| 235 AC_DEFINE(CYGDBG_INFRA_DEBUG_LOOP_INVARIANTS) | |
| 236 fi | |
| 237 | |
| 238 AC_ARG_ENABLE(tracing,[ --disable-tracing disable tracing], | |
| 239 [case "${enableval}" in | |
| 240 yes) cyginfra_tracing=yes ;; | |
| 241 no) cyginfra_tracing=no ;; | |
| 242 *) AC_MSG_ERROR([bad value ${enableval} for disable-tracing option]) ;; | |
| 243 esac]) | |
| 244 if test "${cyginfra_tracing}" = "yes"; then | |
| 245 AC_DEFINE(CYGDBG_USE_TRACING) | |
| 246 fi | |
| 247 | |
| 248 AC_ARG_ENABLE(fntracing,[ --disable-fntracing disable function entry/exit tracing], | |
| 249 [case "${enableval}" in | |
| 250 yes) cyginfra_fntracing=yes ;; | |
| 251 no) cyginfra_fntracing=no ;; | |
| 252 *) AC_MSG_ERROR([bad value ${enableval} for disable-fntracing option]) ;; | |
| 253 esac]) | |
| 254 if test "${cyginfra_fntracing}" = "yes"; then | |
| 255 AC_DEFINE(CYGDBG_INFRA_DEBUG_FUNCTION_REPORTS) | |
| 256 fi | |
| 257 | |
| 258 ]) | |
| 259 | |
| 260 dnl -------------------------------------------------------------------- | |
| 261 dnl Convert a cygwin pathname to something acceptable to VC++ (but | |
| 262 dnl still invoked from bash and cygwin's make). This means using | |
| 263 dnl the cygpath utility and then translating any backslashes into | |
| 264 dnl forward slashes to avoid confusing make. | |
| 265 | |
| 266 AC_DEFUN(CYG_AC_MSVC_PATH, [ | |
| 267 AC_REQUIRE([CYG_AC_PROG_MSVC]) | |
| 268 ifelse($#, 1, , AC_MSG_ERROR("Invalid number of arguments passed to CYG AC_MSVC_PATH")) | |
| 269 | |
| 270 if test "${MSVC}" = "yes" ; then | |
| 271 $1=`cygpath -w ${$1} | tr \\\\\\\\ /` | |
| 272 fi | |
| 273 ]) | |
| 274 | |
| 275 | |
| 276 dnl -------------------------------------------------------------------- | |
| 277 dnl Work out details of the Tcl installation that should be used. | |
| 278 dnl This adds two command-line options, --with-tcl=<prefix> to | |
| 279 dnl specify the Tcl install directory, and --with-tcl-version=<vsn> | |
| 280 dnl to control which version of Tcl should be used. | |
| 281 dnl | |
| 282 dnl On Unix systems and under cygwin there should be a file | |
| 283 dnl $(tcl_prefix)/lib/tclConfig.sh containing all the information | |
| 284 dnl needed for Tcl. This file are consulted and the appropriate | |
| 285 dnl variables extracted. | |
| 286 dnl | |
| 287 dnl To confuse matters, subtly different naming conventions are used | |
| 288 dnl under Unix and NT. Under Unix the Tcl library will be called | |
| 289 dnl libtcl8.0.a, libtcl8.1.a, etc. with a dot between the major and | |
| 290 dnl minor version. Under NT (including cygwin) the library will be | |
| 291 dnl called tcl80.lib, dnl tcl81.lib, libtcl80.a, libtcl81.a, etc. | |
| 292 dnl without a dot. | |
| 293 dnl | |
| 294 dnl The macro should really assume that it is running inside devo, | |
| 295 dnl with tcl and tcl8.1 directories present and already configured. | |
| 296 dnl This is tricky for a number of reasons, including confusion about | |
| 297 dnl the meaning of top_srcdir. | |
| 298 dnl | |
| 299 dnl This macro defines four new shell variables which will be | |
| 300 dnl substituted (typically into Makefile.in): | |
| 301 dnl | |
| 302 dnl cyg_ac_tcl_version - the version of Tcl that is to be used | |
| 303 dnl cyg_ac_tcl_incdir - location of <tcl.h> etc al | |
| 304 dnl cyg_ac_tcl_libdir - location of libtcl.a/tcl.lib etc. | |
| 305 dnl cyg_ac_tcl_libs - all of the libraries that are needed for Tcl | |
| 306 | |
| 307 AC_DEFUN(CYG_AC_PATH_TCL, [ | |
| 308 | |
| 309 AC_REQUIRE([CYG_AC_PROG_MSVC]) | |
| 310 AC_REQUIRE([AC_CYGWIN]) | |
| 311 | |
| 312 dnl Look for the version of Tcl. If none is specified, default to | |
| 313 dnl 8.0 under VC++ and cygwin, nothing under Unix. A version has to be | |
| 314 dnl specified under NT because there is no symbolic link from libtcl.a | |
| 315 dnl to whatever happens to be the most recent installed version. | |
| 316 | |
| 317 AC_MSG_CHECKING(for Tcl version) | |
| 318 AC_ARG_WITH(tcl-version,[ --with-tcl-version=<vsn> version of Tcl to be used],[ | |
| 319 cyg_ac_tcl_version=${with_tcl_version} | |
| 320 ],[ | |
| 321 if test "${MSVC}" = "yes" ; then | |
| 322 cyg_ac_tcl_version=80 | |
| 323 else | |
| 324 if test "${ac_cv_cygwin}" = "yes" ; then | |
| 325 cyg_ac_tcl_version=80 | |
| 326 else | |
| 327 cyg_ac_tcl_version="" | |
| 328 fi | |
| 329 fi | |
| 330 ]) | |
| 331 AC_MSG_RESULT(${cyg_ac_tcl_version}) | |
| 332 AC_SUBST(cyg_ac_tcl_version) | |
| 333 | |
| 334 dnl Where is the Tcl installation? By default assume Tcl is already | |
| 335 dnl installed in the same place as the eCos host-side. | |
| 336 AC_MSG_CHECKING(for Tcl installation) | |
| 337 AC_ARG_WITH(tcl,[ --with-tcl=<path> location of Tcl header and libraries],[ | |
| 338 cyg_ac_tcl_incdir=${with_tcl}/include | |
| 339 cyg_ac_tcl_libdir=${with_tcl}/lib | |
| 340 ],[ | |
| 341 cyg_ac_tcl_incdir=${prefix}/include | |
| 342 cyg_ac_tcl_libdir=${prefix}/lib | |
| 343 ]) | |
| 344 AC_MSG_RESULT(${cyg_ac_tcl_libdir}) | |
| 345 | |
| 346 dnl Sanity check, make sure that there is a tcl.h header file. | |
| 347 dnl If not then there is no point in proceeding. | |
| 348 if test \! -r ${cyg_ac_tcl_incdir}/tcl.h ; then | |
| 349 AC_MSG_ERROR(unable to locate Tcl header file tcl.h) | |
| 350 fi | |
| 351 | |
| 352 dnl If using VC++ then there is no tclConfig.sh file, so the | |
| 353 dnl library information has to be hard-wired. Otherwise ther | |
| 354 dnl should be a tclConfig.sh file containing the necessary information. | |
| 355 if test "${MSVC}" = "yes" ; then | |
| 356 cyg_ac_tcl_libs="tcl${cyg_ac_tcl_version}.lib" | |
| 357 CYG_AC_MSVC_PATH(cyg_ac_tcl_incdir) | |
| 358 CYG_AC_MSVC_PATH(cyg_ac_tcl_libdir) | |
| 359 else | |
| 360 if test \! -r ${cyg_ac_tcl_libdir}/tclConfig.sh ; then | |
| 361 AC_MSG_ERROR(unable to locate Tcl config file tclConfig.sh) | |
| 362 else | |
| 363 . ${cyg_ac_tcl_libdir}/tclConfig.sh | |
| 364 cyg_ac_tcl_libs="-ltcl${cyg_ac_tcl_version} ${TCL_LIBS}" | |
| 365 fi | |
| 366 fi | |
| 367 | |
| 368 AC_SUBST(cyg_ac_tcl_incdir) | |
| 369 AC_SUBST(cyg_ac_tcl_libdir) | |
| 370 AC_SUBST(cyg_ac_tcl_libs) | |
| 371 AC_SUBST(cyg_ac_tk_libs) | |
| 372 ]) | |
| 373 | |
| 374 | |
| 375 | |
| 376 | |
| 377 # Do all the work for Automake. This macro actually does too much -- | |
| 378 # some checks are only needed if your package does certain things. | |
| 379 # But this isn't really a big deal. | |
| 380 | |
| 381 # serial 1 | |
| 382 | |
| 383 dnl Usage: | |
| 384 dnl AM_INIT_AUTOMAKE(package,version, [no-define]) | |
| 385 | |
| 386 AC_DEFUN(AM_INIT_AUTOMAKE, | |
| 387 [AC_REQUIRE([AC_PROG_INSTALL]) | |
| 388 PACKAGE=[$1] | |
| 389 AC_SUBST(PACKAGE) | |
| 390 VERSION=[$2] | |
| 391 AC_SUBST(VERSION) | |
| 392 dnl test to see if srcdir already configured | |
| 393 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then | |
| 394 AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) | |
| 395 fi | |
| 396 ifelse([$3],, | |
| 397 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) | |
| 398 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) | |
| 399 AC_REQUIRE([AM_SANITY_CHECK]) | |
| 400 AC_REQUIRE([AC_ARG_PROGRAM]) | |
| 401 dnl FIXME This is truly gross. | |
| 402 missing_dir=`cd $ac_aux_dir && pwd` | |
| 403 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) | |
| 404 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) | |
| 405 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) | |
| 406 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) | |
| 407 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) | |
| 408 AC_REQUIRE([AC_PROG_MAKE_SET])]) | |
| 409 | |
| 410 # | |
| 411 # Check to make sure that the build environment is sane. | |
| 412 # | |
| 413 | |
| 414 AC_DEFUN(AM_SANITY_CHECK, | |
| 415 [AC_MSG_CHECKING([whether build environment is sane]) | |
| 416 # Just in case | |
| 417 sleep 1 | |
| 418 echo timestamp > conftestfile | |
| 419 # Do `set' in a subshell so we don't clobber the current shell's | |
| 420 # arguments. Must try -L first in case configure is actually a | |
| 421 # symlink; some systems play weird games with the mod time of symlinks | |
| 422 # (eg FreeBSD returns the mod time of the symlink's containing | |
| 423 # directory). | |
| 424 if ( | |
| 425 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` | |
| 426 if test "[$]*" = "X"; then | |
| 427 # -L didn't work. | |
| 428 set X `ls -t $srcdir/configure conftestfile` | |
| 429 fi | |
| 430 if test "[$]*" != "X $srcdir/configure conftestfile" \ | |
| 431 && test "[$]*" != "X conftestfile $srcdir/configure"; then | |
| 432 | |
| 433 # If neither matched, then we have a broken ls. This can happen | |
| 434 # if, for instance, CONFIG_SHELL is bash and it inherits a | |
| 435 # broken ls alias from the environment. This has actually | |
| 436 # happened. Such a system could not be considered "sane". | |
| 437 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken | |
| 438 alias in your environment]) | |
| 439 fi | |
| 440 | |
| 441 test "[$]2" = conftestfile | |
| 442 ) | |
| 443 then | |
| 444 # Ok. | |
| 445 : | |
| 446 else | |
| 447 AC_MSG_ERROR([newly created file is older than distributed files! | |
| 448 Check your system clock]) | |
| 449 fi | |
| 450 rm -f conftest* | |
| 451 AC_MSG_RESULT(yes)]) | |
| 452 | |
| 453 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) | |
| 454 dnl The program must properly implement --version. | |
| 455 AC_DEFUN(AM_MISSING_PROG, | |
| 456 [AC_MSG_CHECKING(for working $2) | |
| 457 # Run test in a subshell; some versions of sh will print an error if | |
| 458 # an executable is not found, even if stderr is redirected. | |
| 459 # Redirect stdin to placate older versions of autoconf. Sigh. | |
| 460 if ($2 --version) < /dev/null > /dev/null 2>&1; then | |
| 461 $1=$2 | |
| 462 AC_MSG_RESULT(found) | |
| 463 else | |
| 464 $1="$3/missing $2" | |
| 465 AC_MSG_RESULT(missing) | |
| 466 fi | |
| 467 AC_SUBST($1)]) | |
| 468 | |
| 469 # Define a conditional. | |
| 470 | |
| 471 AC_DEFUN(AM_CONDITIONAL, | |
| 472 [AC_SUBST($1_TRUE) | |
| 473 AC_SUBST($1_FALSE) | |
| 474 if $2; then | |
| 475 $1_TRUE= | |
| 476 $1_FALSE='#' | |
| 477 else | |
| 478 $1_TRUE='#' | |
| 479 $1_FALSE= | |
| 480 fi]) | |
| 481 | |
| 482 # Add --enable-maintainer-mode option to configure. | |
| 483 # From Jim Meyering | |
| 484 | |
| 485 # serial 1 | |
| 486 | |
| 487 AC_DEFUN(AM_MAINTAINER_MODE, | |
| 488 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) | |
| 489 dnl maintainer-mode is disabled by default | |
| 490 AC_ARG_ENABLE(maintainer-mode, | |
| 491 [ --enable-maintainer-mode enable make rules and dependencies not useful | |
| 492 (and sometimes confusing) to the casual installer], | |
| 493 USE_MAINTAINER_MODE=$enableval, | |
| 494 USE_MAINTAINER_MODE=no) | |
| 495 AC_MSG_RESULT($USE_MAINTAINER_MODE) | |
| 496 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) | |
| 497 MAINT=$MAINTAINER_MODE_TRUE | |
| 498 AC_SUBST(MAINT)dnl | |
| 499 ] | |
| 500 ) | |
| 501 |
