[473b4e5] | 1 | dnl aclocal.m4 generated automatically by aclocal 1.4a |
---|
[a24c280] | 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 $Id$ |
---|
| 14 | |
---|
| 15 | dnl |
---|
| 16 | dnl RTEMS_TOP($1) |
---|
| 17 | dnl |
---|
| 18 | dnl $1 .. relative path from this configure.in to the toplevel configure.in |
---|
| 19 | dnl |
---|
| 20 | AC_DEFUN(RTEMS_TOP, |
---|
| 21 | [dnl |
---|
| 22 | AC_ARG_WITH(target-subdir, |
---|
| 23 | [ --with-target-subdir=DIR], |
---|
| 24 | TARGET_SUBDIR="$withval", |
---|
| 25 | TARGET_SUBDIR=".") |
---|
| 26 | |
---|
| 27 | RTEMS_TOPdir="$1"; |
---|
| 28 | AC_SUBST(RTEMS_TOPdir) |
---|
| 29 | |
---|
| 30 | dnl Determine RTEMS Version string from the VERSION file |
---|
| 31 | dnl Hopefully, Joel never changes its format ;- |
---|
| 32 | AC_MSG_CHECKING([for RTEMS Version]) |
---|
| 33 | if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then |
---|
| 34 | changequote(,)dnl |
---|
| 35 | RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \ |
---|
| 36 | sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'` |
---|
| 37 | changequote([,])dnl |
---|
| 38 | else |
---|
| 39 | AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION) |
---|
| 40 | fi |
---|
| 41 | if test -z "$RTEMS_VERSION"; then |
---|
| 42 | AC_MSG_ERROR(Unable to determine version) |
---|
| 43 | fi |
---|
| 44 | AC_MSG_RESULT($RTEMS_VERSION) |
---|
| 45 | ])dnl |
---|
| 46 | |
---|
| 47 | dnl |
---|
| 48 | dnl $Id$ |
---|
| 49 | dnl |
---|
| 50 | |
---|
| 51 | dnl canonicalize target cpu |
---|
| 52 | dnl NOTE: Most rtems targets do not fullfil autoconf's |
---|
| 53 | dnl target naming conventions "processor-vendor-os" |
---|
| 54 | dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them |
---|
| 55 | dnl and we have to fix it for rtems ourselves |
---|
| 56 | |
---|
| 57 | AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU, |
---|
| 58 | [ |
---|
| 59 | AC_CANONICAL_SYSTEM |
---|
| 60 | AC_MSG_CHECKING(rtems target cpu) |
---|
| 61 | changequote(,)dnl |
---|
| 62 | case "${target}" in |
---|
| 63 | # hpux unix port should go here |
---|
| 64 | i[3456]86-go32-rtems*) |
---|
| 65 | RTEMS_CPU=i386 |
---|
| 66 | ;; |
---|
| 67 | i[3456]86-pc-linux*) # unix "simulator" port |
---|
| 68 | RTEMS_CPU=unix |
---|
| 69 | ;; |
---|
| 70 | i[3456]86-*freebsd2*) # unix "simulator" port |
---|
| 71 | RTEMS_CPU=unix |
---|
| 72 | ;; |
---|
| 73 | no_cpu-*rtems*) |
---|
| 74 | RTEMS_CPU=no_cpu |
---|
| 75 | ;; |
---|
| 76 | sparc-sun-solaris*) # unix "simulator" port |
---|
| 77 | RTEMS_CPU=unix |
---|
| 78 | ;; |
---|
| 79 | *) |
---|
| 80 | RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'` |
---|
| 81 | ;; |
---|
| 82 | esac |
---|
| 83 | changequote([,])dnl |
---|
| 84 | AC_SUBST(RTEMS_CPU) |
---|
| 85 | AC_MSG_RESULT($RTEMS_CPU) |
---|
| 86 | ]) |
---|
| 87 | |
---|
| 88 | # Add --enable-maintainer-mode option to configure. |
---|
| 89 | # From Jim Meyering |
---|
| 90 | |
---|
| 91 | # serial 1 |
---|
| 92 | |
---|
| 93 | AC_DEFUN(AM_MAINTAINER_MODE, |
---|
| 94 | [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) |
---|
| 95 | dnl maintainer-mode is disabled by default |
---|
| 96 | AC_ARG_ENABLE(maintainer-mode, |
---|
| 97 | [ --enable-maintainer-mode enable make rules and dependencies not useful |
---|
| 98 | (and sometimes confusing) to the casual installer], |
---|
| 99 | USE_MAINTAINER_MODE=$enableval, |
---|
| 100 | USE_MAINTAINER_MODE=no) |
---|
| 101 | AC_MSG_RESULT($USE_MAINTAINER_MODE) |
---|
| 102 | AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) |
---|
| 103 | MAINT=$MAINTAINER_MODE_TRUE |
---|
| 104 | AC_SUBST(MAINT)dnl |
---|
| 105 | ] |
---|
| 106 | ) |
---|
| 107 | |
---|
| 108 | # Define a conditional. |
---|
| 109 | |
---|
| 110 | AC_DEFUN(AM_CONDITIONAL, |
---|
| 111 | [AC_SUBST($1_TRUE) |
---|
| 112 | AC_SUBST($1_FALSE) |
---|
| 113 | if $2; then |
---|
| 114 | $1_TRUE= |
---|
| 115 | $1_FALSE='#' |
---|
| 116 | else |
---|
| 117 | $1_TRUE='#' |
---|
| 118 | $1_FALSE= |
---|
| 119 | fi]) |
---|
| 120 | |
---|
| 121 | dnl $Id$ |
---|
| 122 | |
---|
| 123 | AC_DEFUN(RTEMS_ENABLE_MULTIPROCESSING, |
---|
| 124 | [ |
---|
| 125 | AC_ARG_ENABLE(multiprocessing, |
---|
| 126 | [ --enable-multiprocessing enable multiprocessing interface], |
---|
| 127 | [case "${enableval}" in |
---|
| 128 | yes) RTEMS_HAS_MULTIPROCESSING=yes ;; |
---|
| 129 | no) RTEMS_HAS_MULTIPROCESSING=no ;; |
---|
| 130 | *) AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;; |
---|
| 131 | esac],[RTEMS_HAS_MULTIPROCESSING=no]) |
---|
| 132 | AC_SUBST(RTEMS_HAS_MULTIPROCESSING)dnl |
---|
| 133 | ]) |
---|
| 134 | |
---|
| 135 | dnl $Id$ |
---|
| 136 | |
---|
| 137 | AC_DEFUN(RTEMS_ENABLE_POSIX, |
---|
| 138 | [ |
---|
| 139 | AC_ARG_ENABLE(posix, |
---|
| 140 | [ --enable-posix enable posix interface], |
---|
| 141 | [case "${enableval}" in |
---|
| 142 | yes) RTEMS_HAS_POSIX_API=yes ;; |
---|
| 143 | no) RTEMS_HAS_POSIX_API=no ;; |
---|
| 144 | *) AC_MSG_ERROR(bad value ${enableval} for enable-posix option) ;; |
---|
| 145 | esac],[RTEMS_HAS_POSIX_API=yes]) |
---|
| 146 | AC_SUBST(RTEMS_HAS_POSIX_API) |
---|
| 147 | |
---|
| 148 | changequote(,)dnl |
---|
| 149 | case "${target}" in |
---|
| 150 | # hpux unix port should go here |
---|
| 151 | i[3456]86-go32-rtems*) |
---|
| 152 | RTEMS_HAS_POSIX_API=no |
---|
| 153 | ;; |
---|
| 154 | i[3456]86-pc-linux*) # unix "simulator" port |
---|
| 155 | RTEMS_HAS_POSIX_API=no |
---|
| 156 | ;; |
---|
| 157 | i[3456]86-*freebsd2*) # unix "simulator" port |
---|
| 158 | RTEMS_HAS_POSIX_API=no |
---|
| 159 | ;; |
---|
| 160 | no_cpu-*rtems*) |
---|
| 161 | RTEMS_HAS_POSIX_API=no |
---|
| 162 | ;; |
---|
| 163 | sparc-sun-solaris*) # unix "simulator" port |
---|
| 164 | RTEMS_HAS_POSIX_API=no |
---|
| 165 | ;; |
---|
| 166 | *) |
---|
| 167 | ;; |
---|
| 168 | esac |
---|
| 169 | changequote([,])dnl |
---|
| 170 | AC_SUBST(RTEMS_HAS_POSIX_API) |
---|
| 171 | ]) |
---|
| 172 | |
---|
| 173 | dnl $Id$ |
---|
| 174 | |
---|
| 175 | AC_DEFUN(RTEMS_ENABLE_INLINES, |
---|
| 176 | [AC_ARG_ENABLE(rtems-inlines, |
---|
| 177 | [ --enable-rtems-inlines enable RTEMS inline functions] |
---|
| 178 | [ (default:enabled, disable to use macros)], |
---|
| 179 | [case "${enableval}" in |
---|
| 180 | yes) RTEMS_USE_MACROS=no ;; |
---|
| 181 | no) RTEMS_USE_MACROS=yes ;; |
---|
| 182 | *) AC_MSG_ERROR(bad value ${enableval} for disable-rtems-inlines option) ;; |
---|
| 183 | esac],[RTEMS_USE_MACROS=no]) |
---|
| 184 | AC_SUBST(RTEMS_USE_MACROS)dnl |
---|
| 185 | ]) |
---|
| 186 | |
---|
| 187 | dnl $Id$ |
---|
| 188 | |
---|
| 189 | AC_DEFUN(RTEMS_ENABLE_LIBCDIR, |
---|
| 190 | [ |
---|
| 191 | AC_ARG_ENABLE(libcdir, |
---|
| 192 | [ --enable-libcdir=directory set the directory for the C library], |
---|
| 193 | [ RTEMS_LIBC_DIR="${enableval}" ; \ |
---|
| 194 | test -d ${enableval} || AC_MSG_ERROR("$enableval is not a directory" ) ] ) |
---|
| 195 | AC_SUBST(RTEMS_LIBC_DIR)dnl |
---|
| 196 | ]) |
---|
| 197 | |
---|
| 198 | dnl $Id$ |
---|
| 199 | |
---|
| 200 | dnl Override the set of BSPs to be built. |
---|
| 201 | dnl used by the toplevel configure script |
---|
| 202 | dnl RTEMS_ENABLE_RTEMSBSP(rtems_bsp_list) |
---|
| 203 | AC_DEFUN(RTEMS_ENABLE_RTEMSBSP, |
---|
| 204 | [ |
---|
| 205 | AC_ARG_ENABLE(rtemsbsp, |
---|
| 206 | [ --enable-rtemsbsp=bsp1 bsp2 .. BSPs to include in build], |
---|
| 207 | [case "${enableval}" in |
---|
| 208 | yes|no) AC_MSG_ERROR([missing argument to --enable-rtemsbsp=\"bsp1 bsp2\"]);; |
---|
| 209 | *) $1=$enableval;; |
---|
| 210 | esac],[$1=""]) |
---|
| 211 | ]) |
---|
| 212 | |
---|
| 213 | dnl Pass a single BSP via an environment variable |
---|
| 214 | dnl used by per BSP configure scripts |
---|
| 215 | AC_DEFUN(RTEMS_ENV_RTEMSBSP, |
---|
| 216 | [dnl |
---|
| 217 | AC_MSG_CHECKING([for RTEMS_BSP]) |
---|
| 218 | AC_CACHE_VAL(rtems_cv_RTEMS_BSP, |
---|
| 219 | [dnl |
---|
| 220 | test -n "${RTEMS_BSP}" && rtems_cv_RTEMS_BSP="$RTEMS_BSP"; |
---|
| 221 | ])dnl |
---|
| 222 | if test -z "$rtems_cv_RTEMS_BSP"; then |
---|
| 223 | AC_MSG_ERROR([Missing RTEMS_BSP]) |
---|
| 224 | fi |
---|
| 225 | RTEMS_BSP="$rtems_cv_RTEMS_BSP" |
---|
| 226 | AC_MSG_RESULT(${RTEMS_BSP}) |
---|
| 227 | AC_SUBST(RTEMS_BSP) |
---|
| 228 | ]) |
---|
| 229 | |
---|
| 230 | dnl $Id$ |
---|
| 231 | |
---|
| 232 | dnl check if RTEMS support a cpu |
---|
| 233 | AC_DEFUN(RTEMS_CHECK_CPU, |
---|
| 234 | [dnl |
---|
| 235 | AC_REQUIRE([RTEMS_TOP]) |
---|
| 236 | AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU]) |
---|
| 237 | # Is this a supported CPU? |
---|
| 238 | AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported]) |
---|
| 239 | if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then |
---|
| 240 | AC_MSG_RESULT(yes) |
---|
| 241 | else |
---|
| 242 | AC_MSG_ERROR(no) |
---|
| 243 | fi |
---|
| 244 | ])dnl |
---|
| 245 | |
---|
| 246 | |
---|
| 247 | dnl $Id$ |
---|
| 248 | |
---|
| 249 | AC_DEFUN(RTEMS_CANONICAL_HOST, |
---|
| 250 | [dnl |
---|
| 251 | AC_REQUIRE([AC_CANONICAL_HOST]) |
---|
| 252 | RTEMS_HOST=$host_os |
---|
| 253 | changequote(,)dnl |
---|
| 254 | case "${target}" in |
---|
| 255 | # hpux unix port should go here |
---|
| 256 | i[3456]86-pc-linux*) # unix "simulator" port |
---|
| 257 | RTEMS_HOST=Linux |
---|
| 258 | ;; |
---|
| 259 | i[3456]86-*freebsd2*) # unix "simulator" port |
---|
| 260 | RTEMS_HOST=FreeBSD |
---|
| 261 | ;; |
---|
| 262 | sparc-sun-solaris*) # unix "simulator" port |
---|
| 263 | RTEMS_HOST=Solaris |
---|
| 264 | ;; |
---|
| 265 | *) |
---|
| 266 | ;; |
---|
| 267 | esac |
---|
| 268 | changequote([,])dnl |
---|
| 269 | AC_SUBST(RTEMS_HOST) |
---|
| 270 | ])dnl |
---|
| 271 | |
---|
| 272 | dnl |
---|
| 273 | dnl $Id$ |
---|
| 274 | dnl |
---|
| 275 | |
---|
| 276 | AC_DEFUN(RTEMS_PROJECT_ROOT, |
---|
| 277 | [dnl |
---|
| 278 | AC_REQUIRE([RTEMS_TOP]) |
---|
| 279 | if test "$TARGET_SUBDIR" = "." ; then |
---|
| 280 | PROJECT_ROOT=$RTEMS_TOPdir/'$(top_builddir)'; |
---|
| 281 | else |
---|
| 282 | PROJECT_ROOT=../$RTEMS_TOPdir/'$(top_builddir)' |
---|
| 283 | fi |
---|
| 284 | AC_SUBST(PROJECT_ROOT) |
---|
| 285 | |
---|
| 286 | RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP |
---|
| 287 | AC_SUBST(RTEMS_ROOT) |
---|
| 288 | |
---|
| 289 | INSTALL_CHANGE="\$(KSH) \$(PROJECT_ROOT)/tools/build/install-if-change" |
---|
| 290 | AC_SUBST(INSTALL_CHANGE) |
---|
| 291 | |
---|
| 292 | PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex" |
---|
| 293 | AC_SUBST(PACKHEX) |
---|
| 294 | ]) |
---|
| 295 | |
---|
| 296 | |
---|
| 297 | dnl |
---|
| 298 | dnl $Id$ |
---|
| 299 | dnl |
---|
| 300 | dnl Check for target gcc |
---|
| 301 | dnl |
---|
| 302 | dnl 98/05/20 Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
| 303 | dnl Completely reworked |
---|
| 304 | |
---|
| 305 | AC_DEFUN(RTEMS_PROG_CC, |
---|
| 306 | [ |
---|
| 307 | AC_BEFORE([$0], [AC_PROG_CPP])dnl |
---|
| 308 | AC_BEFORE([$0], [AC_PROG_CC])dnl |
---|
| 309 | AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl |
---|
| 310 | |
---|
| 311 | dnl Only accept gcc and cc |
---|
| 312 | dnl NOTE: This might be too restrictive for native compilation |
---|
| 313 | AC_PATH_PROGS(CC_FOR_TARGET, "$program_prefix"gcc "$program_prefix"cc ) |
---|
| 314 | test -z "$CC_FOR_TARGET" \ |
---|
| 315 | && AC_MSG_ERROR([no acceptable cc found in \$PATH]) |
---|
| 316 | |
---|
| 317 | dnl backup |
---|
| 318 | rtems_save_CC=$CC |
---|
| 319 | rtems_save_CFLAGS=$CFLAGS |
---|
| 320 | |
---|
| 321 | dnl temporarily set CC |
---|
| 322 | CC=$CC_FOR_TARGET |
---|
| 323 | |
---|
| 324 | AC_PROG_CC_WORKS |
---|
| 325 | AC_PROG_CC_GNU |
---|
| 326 | |
---|
| 327 | if test $ac_cv_prog_gcc = yes; then |
---|
| 328 | GCC=yes |
---|
| 329 | dnl Check whether -g works, even if CFLAGS is set, in case the package |
---|
| 330 | dnl plays around with CFLAGS (such as to build both debugging and |
---|
| 331 | dnl normal versions of a library), tasteless as that idea is. |
---|
| 332 | ac_test_CFLAGS="${CFLAGS+set}" |
---|
| 333 | ac_save_CFLAGS="$CFLAGS" |
---|
| 334 | CFLAGS= |
---|
| 335 | AC_PROG_CC_G |
---|
| 336 | if test "$ac_test_CFLAGS" = set; then |
---|
| 337 | CFLAGS="$ac_save_CFLAGS" |
---|
| 338 | elif test $ac_cv_prog_cc_g = yes; then |
---|
| 339 | CFLAGS="-g -O2" |
---|
| 340 | else |
---|
| 341 | CFLAGS="-O2" |
---|
| 342 | fi |
---|
| 343 | else |
---|
| 344 | GCC= |
---|
| 345 | test "${CFLAGS+set}" = set || CFLAGS="-g" |
---|
| 346 | fi |
---|
| 347 | |
---|
| 348 | rtems_cv_prog_gcc=$ac_cv_prog_gcc |
---|
| 349 | rtems_cv_prog_cc_g=$ac_cv_prog_cc_g |
---|
| 350 | rtems_cv_prog_cc_works=$ac_cv_prog_cc_works |
---|
| 351 | rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross |
---|
| 352 | |
---|
| 353 | dnl restore initial values |
---|
| 354 | CC=$rtems_save_CC |
---|
| 355 | CFLAGS=$rtems_save_CFLAGS |
---|
| 356 | |
---|
| 357 | unset ac_cv_prog_gcc |
---|
| 358 | unset ac_cv_prog_cc_g |
---|
| 359 | unset ac_cv_prog_cc_works |
---|
| 360 | unset ac_cv_prog_cc_cross |
---|
| 361 | ]) |
---|
| 362 | |
---|
| 363 | AC_DEFUN(RTEMS_PROG_CC_FOR_TARGET, |
---|
| 364 | [ |
---|
| 365 | dnl check target cc |
---|
| 366 | RTEMS_PROG_CC |
---|
| 367 | dnl check if the compiler supports --specs |
---|
| 368 | RTEMS_GCC_SPECS |
---|
| 369 | dnl check if the target compiler may use --pipe |
---|
| 370 | RTEMS_GCC_PIPE |
---|
| 371 | dnl check if the compiler supports --specs if gcc28 is requested |
---|
| 372 | if test "$RTEMS_USE_GCC272" != "yes" ; then |
---|
| 373 | if test "$rtems_cv_gcc_specs" = "no"; then |
---|
| 374 | AC_MSG_WARN([*** disabling --enable-gcc28]) |
---|
| 375 | RTEMS_USE_GCC272=yes |
---|
| 376 | fi |
---|
| 377 | fi |
---|
| 378 | test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe" |
---|
| 379 | |
---|
| 380 | dnl FIXME: HACK for egcs/cygwin mixing '\\' and '/' in gcc -print-* |
---|
| 381 | case $host_os in |
---|
| 382 | *cygwin*) GCCSED="| sed 's%\\\\%/%g'" ;; |
---|
| 383 | *) ;; |
---|
| 384 | esac |
---|
| 385 | AC_SUBST(GCCSED) |
---|
| 386 | ]) |
---|
| 387 | |
---|
| 388 | dnl |
---|
| 389 | dnl $Id$ |
---|
| 390 | dnl |
---|
| 391 | dnl Set program_prefix |
---|
| 392 | dnl |
---|
| 393 | dnl 98/05/20 Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
| 394 | dnl Extracted from configure |
---|
| 395 | |
---|
| 396 | AC_DEFUN(RTEMS_TOOL_PREFIX, |
---|
| 397 | [AC_REQUIRE([AC_CANONICAL_TARGET])dnl |
---|
| 398 | AC_REQUIRE([AC_CANONICAL_BUILD])dnl |
---|
| 399 | |
---|
| 400 | changequote(,)dnl |
---|
| 401 | if [ "${program_prefix}" = "NONE" ] ; then |
---|
| 402 | if [ "${target}" = "${host}" ] ; then |
---|
| 403 | program_prefix= |
---|
| 404 | else |
---|
| 405 | program_prefix=${target}- |
---|
| 406 | fi |
---|
| 407 | fi |
---|
| 408 | changequote([,])dnl |
---|
| 409 | ]) |
---|
| 410 | |
---|
| 411 | dnl |
---|
| 412 | dnl $Id$ |
---|
| 413 | dnl |
---|
| 414 | dnl Check whether the target compiler accepts -specs |
---|
| 415 | dnl |
---|
| 416 | dnl 98/02/11 Ralf Corsepius corsepiu@faw.uni-ulm.de |
---|
| 417 | dnl |
---|
| 418 | |
---|
| 419 | AC_DEFUN(RTEMS_GCC_SPECS, |
---|
| 420 | [AC_REQUIRE([RTEMS_PROG_CC]) |
---|
| 421 | AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs, |
---|
| 422 | [ |
---|
| 423 | rtems_cv_gcc_specs=no |
---|
| 424 | if test "$rtems_cv_prog_gcc" = "yes"; then |
---|
| 425 | touch confspec |
---|
| 426 | echo 'void f(){}' >conftest.c |
---|
| 427 | if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then |
---|
| 428 | rtems_cv_gcc_specs=yes |
---|
| 429 | fi |
---|
| 430 | fi |
---|
| 431 | rm -f confspec conftest* |
---|
| 432 | ])]) |
---|
| 433 | |
---|
| 434 | dnl |
---|
| 435 | dnl $Id$ |
---|
| 436 | dnl |
---|
| 437 | dnl Check whether the target compiler accepts -pipe |
---|
| 438 | dnl |
---|
| 439 | dnl 98/02/11 Ralf Corsepius corsepiu@faw.uni-ulm.de |
---|
| 440 | dnl |
---|
| 441 | |
---|
| 442 | AC_DEFUN(RTEMS_GCC_PIPE, |
---|
| 443 | [AC_REQUIRE([RTEMS_PROG_CC]) |
---|
| 444 | AC_REQUIRE([AC_CANONICAL_HOST]) |
---|
| 445 | AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe, |
---|
| 446 | [ |
---|
| 447 | rtems_cv_gcc_pipe=no |
---|
| 448 | if test "$rtems_cv_prog_gcc" = "yes"; then |
---|
| 449 | case "$host_os" in |
---|
| 450 | cygwin*) |
---|
| 451 | ;; |
---|
| 452 | *) |
---|
| 453 | echo 'void f(){}' >conftest.c |
---|
| 454 | if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then |
---|
| 455 | rtems_cv_gcc_pipe=yes |
---|
| 456 | fi |
---|
| 457 | rm -f conftest* |
---|
| 458 | ;; |
---|
| 459 | esac |
---|
| 460 | fi |
---|
| 461 | ]) |
---|
| 462 | ]) |
---|
| 463 | |
---|
| 464 | dnl |
---|
| 465 | dnl $Id$ |
---|
| 466 | dnl |
---|
| 467 | dnl Set target tools |
---|
| 468 | dnl |
---|
| 469 | dnl 98/06/23 Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
| 470 | dnl fixing cache/environment variable handling |
---|
| 471 | dnl adding checks for cygwin/egcs '\\'-bug |
---|
| 472 | dnl adding checks for ranlib/ar -s problem |
---|
| 473 | dnl |
---|
| 474 | dnl 98/02/12 Ralf Corsepius (corsepiu@faw.uni-ulm.de) |
---|
| 475 | dnl |
---|
| 476 | |
---|
| 477 | AC_DEFUN(RTEMS_GCC_PRINT, |
---|
| 478 | [ case $host_os in |
---|
| 479 | *cygwin*) |
---|
| 480 | dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/' |
---|
| 481 | dnl Should be removed once cygwin/egcs reports '/' only |
---|
| 482 | $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e 's%\\\\%/%g' ` |
---|
| 483 | ;; |
---|
| 484 | *) |
---|
| 485 | $1=`$CC_FOR_TARGET --print-prog-name=$2` |
---|
| 486 | ;; |
---|
| 487 | esac |
---|
| 488 | ]) |
---|
| 489 | |
---|
| 490 | AC_DEFUN(RTEMS_PATH_TOOL, |
---|
| 491 | [ |
---|
| 492 | AC_MSG_CHECKING([target's $2]) |
---|
| 493 | AC_CACHE_VAL(ac_cv_path_$1,:) |
---|
| 494 | AC_MSG_RESULT([$ac_cv_path_$1]) |
---|
| 495 | |
---|
| 496 | if test -n "$ac_cv_path_$1"; then |
---|
| 497 | dnl retrieve the value from the cache |
---|
| 498 | $1=$ac_cv_path_$1 |
---|
| 499 | else |
---|
| 500 | dnl the cache was not set |
---|
| 501 | if test -z "[$]$1" ; then |
---|
| 502 | if test "$rtems_cv_prog_gcc" = "yes"; then |
---|
| 503 | # We are using gcc, ask it about its tool |
---|
| 504 | # NOTE: Necessary if gcc was configured to use the target's |
---|
| 505 | # native tools or uses prefixes for gnutools (e.g. gas instead of as) |
---|
| 506 | RTEMS_GCC_PRINT($1,$2) |
---|
| 507 | fi |
---|
| 508 | else |
---|
| 509 | # The user set an environment variable. |
---|
| 510 | # Check whether it is an absolute path, otherwise AC_PATH_PROG |
---|
| 511 | # will override the environment variable, which isn't what the user |
---|
| 512 | # intends |
---|
| 513 | AC_MSG_CHECKING([whether environment variable $1 is an absolute path]) |
---|
| 514 | case "[$]$1" in |
---|
| 515 | /*) # valid |
---|
| 516 | AC_MSG_RESULT("yes") |
---|
| 517 | ;; |
---|
| 518 | *) # invalid for AC_PATH_PROG |
---|
| 519 | AC_MSG_RESULT("no") |
---|
| 520 | AC_MSG_ERROR([***] |
---|
| 521 | [Environment variable $1 should either] |
---|
| 522 | [be unset (preferred) or contain an absolute path]) |
---|
| 523 | ;; |
---|
| 524 | esac |
---|
| 525 | fi |
---|
| 526 | |
---|
| 527 | AC_PATH_PROG($1,"$program_prefix"$2,$3) |
---|
| 528 | fi |
---|
| 529 | ]) |
---|
| 530 | |
---|
| 531 | AC_DEFUN(RTEMS_CANONICALIZE_TOOLS, |
---|
| 532 | [AC_REQUIRE([RTEMS_PROG_CC])dnl |
---|
| 533 | |
---|
| 534 | dnl FIXME: What shall be done if these tools are not available? |
---|
| 535 | RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no) |
---|
| 536 | RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no) |
---|
| 537 | RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no) |
---|
| 538 | RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no) |
---|
| 539 | |
---|
| 540 | dnl special treatment of ranlib |
---|
| 541 | RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no) |
---|
| 542 | if test "$RANLIB_FOR_TARGET" = "no"; then |
---|
| 543 | # ranlib wasn't found; check if ar -s is available |
---|
| 544 | RTEMS_AR_FOR_TARGET_S |
---|
| 545 | if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then |
---|
| 546 | dnl override RANLIB_FOR_TARGET's cache |
---|
| 547 | ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s" |
---|
| 548 | RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET |
---|
| 549 | else |
---|
| 550 | AC_MSG_ERROR([***] |
---|
| 551 | [Can't figure out how to build a library index] |
---|
| 552 | [Neither ranlib nor ar -s seem to be available] ) |
---|
| 553 | fi |
---|
| 554 | fi |
---|
| 555 | |
---|
| 556 | dnl NOTE: These may not be available if not using gnutools |
---|
| 557 | RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no) |
---|
| 558 | RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no) |
---|
| 559 | RTEMS_PATH_TOOL(STRIP_FOR_TARGET,strip,no) |
---|
| 560 | ]) |
---|
| 561 | |
---|
| 562 | dnl |
---|
| 563 | dnl $Id$ |
---|
| 564 | dnl |
---|
| 565 | |
---|
| 566 | AC_DEFUN(RTEMS_AR_FOR_TARGET_S, |
---|
| 567 | [ |
---|
| 568 | AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works, |
---|
| 569 | rtems_cv_AR_FOR_TARGET_S, |
---|
| 570 | [ |
---|
| 571 | cat > conftest.$ac_ext <<EOF |
---|
| 572 | int foo( int b ) |
---|
| 573 | { return b; } |
---|
| 574 | EOF |
---|
| 575 | if AC_TRY_COMMAND($CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext) \ |
---|
| 576 | && AC_TRY_COMMAND($AR_FOR_TARGET -sr conftest.a conftest.o) \ |
---|
| 577 | && test -s conftest.a ; \ |
---|
| 578 | then |
---|
| 579 | rtems_cv_AR_FOR_TARGET_S="yes" |
---|
| 580 | else |
---|
| 581 | rtems_cv_AR_FOR_TARGET_S="no" |
---|
| 582 | fi |
---|
| 583 | rm -f conftest* |
---|
| 584 | ]) |
---|
| 585 | ]) |
---|
| 586 | |
---|
| 587 | |
---|
| 588 | dnl $Id$ |
---|
| 589 | |
---|
| 590 | AC_DEFUN(RTEMS_CHECK_NEWLIB, |
---|
| 591 | [dnl |
---|
| 592 | AC_REQUIRE([RTEMS_PROG_CC_FOR_TARGET])dnl |
---|
| 593 | AC_REQUIRE([RTEMS_CANONICALIZE_TOOLS])dnl |
---|
| 594 | AC_CACHE_CHECK([for newlib], |
---|
| 595 | rtems_cv_use_newlib, |
---|
| 596 | [ |
---|
| 597 | rtems_save_CC=$CC |
---|
| 598 | CC=$CC_FOR_TARGET |
---|
| 599 | |
---|
| 600 | dnl some versions of newlib provide not_required_by_rtems |
---|
| 601 | AC_TRY_LINK( |
---|
| 602 | [extern int not_required_by_rtems() ;], |
---|
| 603 | [not_required_by_rtems()], |
---|
| 604 | rtems_cv_use_newlib="yes") |
---|
| 605 | |
---|
| 606 | dnl older versions of newlib provided rtems_provides_crt0 |
---|
| 607 | if test -z "$rtems_cv_use_newlib"; then |
---|
| 608 | AC_TRY_LINK( |
---|
| 609 | [extern int rtems_provides_crt0 ;], |
---|
| 610 | [rtems_provides_crt0 = 0], |
---|
| 611 | rtems_cv_use_newlib="yes", |
---|
| 612 | rtems_cv_use_newlib="no") |
---|
| 613 | fi |
---|
| 614 | CC=$rtems_save_CC]) |
---|
| 615 | RTEMS_USE_NEWLIB="$rtems_cv_use_newlib" |
---|
| 616 | AC_SUBST(RTEMS_USE_NEWLIB) |
---|
| 617 | ]) |
---|
| 618 | |
---|
| 619 | |
---|
| 620 | dnl $Id$ |
---|
| 621 | |
---|
| 622 | dnl Report all available bsps for a target, |
---|
| 623 | dnl check if a bsp-subdirectory is present for all bsps found |
---|
| 624 | dnl |
---|
| 625 | dnl RTEMS_CHECK_BSPS(bsp_list) |
---|
| 626 | AC_DEFUN(RTEMS_CHECK_BSPS, |
---|
| 627 | [ |
---|
| 628 | AC_REQUIRE([RTEMS_CHECK_CPU])dnl sets RTEMS_CPU, target |
---|
| 629 | AC_REQUIRE([RTEMS_TOP])dnl sets RTEMS_TOPdir |
---|
| 630 | AC_MSG_CHECKING([for bsps]) |
---|
| 631 | case "${target}" in |
---|
| 632 | changequote(,)dnl |
---|
| 633 | i[3456]86-go32-rtems*) |
---|
| 634 | changequote([,])dnl |
---|
| 635 | $1="go32 go32_p5" |
---|
| 636 | ;; |
---|
| 637 | *) |
---|
| 638 | files=`ls $srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU` |
---|
| 639 | for file in $files; do |
---|
| 640 | case $file in |
---|
| 641 | shared*);; |
---|
| 642 | Makefile*);; |
---|
| 643 | READ*);; |
---|
| 644 | CVS*);; |
---|
| 645 | pxfl*);; |
---|
| 646 | go32*);; # so the i386 port can pick up the other Makefiles |
---|
| 647 | # Now account for BSPs with build variants |
---|
| 648 | gen68360) rtems_bsp="$rtems_bsp gen68360 gen68360_040";; |
---|
| 649 | p4000) rtems_bsp="$rtems_bsp p4600 p4650";; |
---|
| 650 | mvme162) rtems_bsp="$rtems_bsp mvme162 mvme162lx";; |
---|
| 651 | *) $1="[$]$1 $file";; |
---|
| 652 | esac; |
---|
| 653 | done |
---|
| 654 | ;; |
---|
| 655 | esac |
---|
| 656 | AC_MSG_RESULT([[$]$1 .. done]) |
---|
| 657 | ])dnl |
---|
| 658 | |
---|
| 659 | AC_DEFUN(RTEMS_CHECK_CUSTOM_BSP, |
---|
| 660 | [dnl |
---|
| 661 | AC_MSG_CHECKING([for make/custom/[$]$1.cfg]) |
---|
| 662 | if test -r "$srcdir/$RTEMS_TOPdir/make/custom/[$]$1.cfg"; then |
---|
| 663 | AC_MSG_RESULT([yes]) |
---|
| 664 | else |
---|
| 665 | AC_MSG_ERROR([no]) |
---|
| 666 | fi |
---|
| 667 | ])dnl |
---|
| 668 | |
---|
| 669 | dnl |
---|
| 670 | dnl $Id$ |
---|
| 671 | dnl |
---|
| 672 | |
---|
| 673 | AC_DEFUN(RTEMS_CHECK_MULTIPROCESSING, |
---|
| 674 | [dnl |
---|
| 675 | AC_REQUIRE([RTEMS_TOP])dnl |
---|
| 676 | AC_REQUIRE([RTEMS_CHECK_CPU])dnl |
---|
| 677 | AC_CACHE_CHECK([whether BSP supports multiprocessing], |
---|
| 678 | rtems_cv_HAS_MP, |
---|
| 679 | [dnl |
---|
| 680 | if test -d "$srcdir/${RTEMS_TOPdir}/c/src/lib/libbsp/${RTEMS_CPU}/${$1}/shmsupp"; then |
---|
| 681 | if test "$RTEMS_HAS_MULTIPROCESSING" = "yes"; then |
---|
| 682 | rtems_cv_HAS_MP="yes" ; |
---|
| 683 | else |
---|
| 684 | rtems_cv_HAS_MP="disabled"; |
---|
| 685 | fi |
---|
| 686 | else |
---|
| 687 | rtems_cv_HAS_MP="no"; |
---|
| 688 | fi]) |
---|
| 689 | if test "$rtems_cv_HAS_MP" = "yes"; then |
---|
| 690 | HAS_MP="yes" |
---|
| 691 | else |
---|
| 692 | HAS_MP="no" |
---|
| 693 | fi |
---|
| 694 | AC_SUBST(HAS_MP) |
---|
| 695 | ]) |
---|
| 696 | |
---|
| 697 | dnl $Id$ |
---|
| 698 | dnl |
---|
| 699 | AC_DEFUN(RTEMS_CHECK_POSIX_API, |
---|
| 700 | [dnl |
---|
| 701 | AC_REQUIRE([RTEMS_CHECK_CPU])dnl |
---|
| 702 | AC_CACHE_CHECK([whether BSP supports libposix], |
---|
| 703 | rtems_cv_HAS_POSIX_API, |
---|
| 704 | [dnl |
---|
| 705 | case "$RTEMS_CPU" in |
---|
| 706 | unix*) |
---|
| 707 | rtems_cv_HAS_POSIX_API="no" |
---|
| 708 | ;; |
---|
| 709 | *) |
---|
| 710 | if test "${RTEMS_HAS_POSIX_API}" = "yes"; then |
---|
| 711 | rtems_cv_HAS_POSIX_API="yes"; |
---|
| 712 | else |
---|
| 713 | rtems_cv_HAS_POSIX_API="disabled"; |
---|
| 714 | fi |
---|
| 715 | ;; |
---|
| 716 | esac]) |
---|
| 717 | if test "$rtems_cv_HAS_POSIX_API" = "yes"; then |
---|
| 718 | HAS_POSIX_API="yes"; |
---|
| 719 | else |
---|
| 720 | HAS_POSIX_API="no"; |
---|
| 721 | fi |
---|
| 722 | AC_SUBST(HAS_POSIX_API)dnl |
---|
| 723 | ]) |
---|
| 724 | |
---|
| 725 | dnl |
---|
| 726 | dnl $Id$ |
---|
| 727 | dnl |
---|
| 728 | dnl Check for System V IPC calls used by Unix simulators |
---|
| 729 | dnl |
---|
| 730 | dnl 98/07/17 Dario Alcocer alcocer@netcom.com |
---|
| 731 | dnl Ralf Corsepius corsepiu@faw.uni-ulm.de |
---|
| 732 | dnl |
---|
| 733 | dnl Note: $host_os should probably *not* ever be used here to |
---|
| 734 | dnl determine if host supports System V IPC calls, since some |
---|
| 735 | dnl (e.g. FreeBSD 2.x) are configured by default to include only |
---|
| 736 | dnl a subset of the System V IPC calls. Therefore, to make sure |
---|
| 737 | dnl all of the required calls are found, test for each call explicitly. |
---|
| 738 | dnl |
---|
| 739 | dnl All of the calls use IPC_PRIVATE, so tests will not unintentionally |
---|
| 740 | dnl modify any existing key sets. See the man pages for semget, shmget, |
---|
| 741 | dnl msgget, semctl, shmctl and msgctl for details. |
---|
| 742 | |
---|
| 743 | AC_DEFUN(RTEMS_UNION_SEMUN, |
---|
| 744 | [ |
---|
| 745 | AC_CACHE_CHECK([whether $RTEMS_HOST defines union semun], |
---|
| 746 | rtems_cv_HAS_UNION_SEMUN, |
---|
| 747 | [AC_TRY_COMPILE([ |
---|
| 748 | #include <sys/types.h> |
---|
| 749 | #include <sys/ipc.h> |
---|
| 750 | #include <sys/sem.h>], |
---|
| 751 | [union semun arg ;], |
---|
| 752 | [rtems_cv_HAS_UNION_SEMUN="yes"], |
---|
| 753 | [rtems_cv_HAS_UNION_SEMUN="no"]) |
---|
| 754 | |
---|
| 755 | if test "$rtems_cv_HAS_UNION_SEMUN" = "yes"; then |
---|
| 756 | AC_DEFINE(HAS_UNION_SEMUN) |
---|
| 757 | fi]) |
---|
| 758 | ]) |
---|
| 759 | |
---|
| 760 | AC_DEFUN(RTEMS_SYSV_SEM, |
---|
| 761 | [AC_REQUIRE([AC_PROG_CC]) |
---|
| 762 | AC_REQUIRE([RTEMS_CANONICAL_HOST]) |
---|
| 763 | AC_CACHE_CHECK(whether $RTEMS_HOST supports System V semaphores, |
---|
| 764 | rtems_cv_sysv_sem, |
---|
| 765 | [ |
---|
| 766 | AC_TRY_RUN( |
---|
| 767 | [ |
---|
| 768 | #include <sys/types.h> |
---|
| 769 | #include <sys/ipc.h> |
---|
| 770 | #include <sys/sem.h> |
---|
| 771 | #if !HAS_UNION_SEMUN |
---|
| 772 | union semun { |
---|
| 773 | int val; |
---|
| 774 | struct semid_ds *buf; |
---|
| 775 | ushort *array; |
---|
| 776 | } ; |
---|
| 777 | #endif |
---|
| 778 | int main () { |
---|
| 779 | union semun arg ; |
---|
| 780 | |
---|
| 781 | int id=semget(IPC_PRIVATE,1,IPC_CREAT|0400); |
---|
| 782 | if (id == -1) |
---|
| 783 | exit(1); |
---|
| 784 | arg.val = 0; /* avoid implicit type cast to union */ |
---|
| 785 | if (semctl(id, 0, IPC_RMID, arg) == -1) |
---|
| 786 | exit(1); |
---|
| 787 | exit(0); |
---|
| 788 | } |
---|
| 789 | ], |
---|
| 790 | rtems_cv_sysv_sem="yes", rtems_cv_sysv_sem="no", :) |
---|
| 791 | ]) |
---|
| 792 | ]) |
---|
| 793 | |
---|
| 794 | AC_DEFUN(RTEMS_SYSV_SHM, |
---|
| 795 | [AC_REQUIRE([AC_PROG_CC]) |
---|
| 796 | AC_REQUIRE([RTEMS_CANONICAL_HOST]) |
---|
| 797 | AC_CACHE_CHECK(whether $RTEMS_HOST supports System V shared memory, |
---|
| 798 | rtems_cv_sysv_shm, |
---|
| 799 | [ |
---|
| 800 | AC_TRY_RUN([ |
---|
| 801 | #include <sys/types.h> |
---|
| 802 | #include <sys/ipc.h> |
---|
| 803 | #include <sys/shm.h> |
---|
| 804 | int main () { |
---|
| 805 | int id=shmget(IPC_PRIVATE,1,IPC_CREAT|0400); |
---|
| 806 | if (id == -1) |
---|
| 807 | exit(1); |
---|
| 808 | if (shmctl(id, IPC_RMID, 0) == -1) |
---|
| 809 | exit(1); |
---|
| 810 | exit(0); |
---|
| 811 | } |
---|
| 812 | ], |
---|
| 813 | rtems_cv_sysv_shm="yes", rtems_cv_sysv_shm="no", :) |
---|
| 814 | ]) |
---|
| 815 | ]) |
---|
| 816 | |
---|
| 817 | AC_DEFUN(RTEMS_SYSV_MSG, |
---|
| 818 | [AC_REQUIRE([AC_PROG_CC]) |
---|
| 819 | AC_REQUIRE([RTEMS_CANONICAL_HOST]) |
---|
| 820 | AC_CACHE_CHECK(whether $RTEMS_HOST supports System V messages, |
---|
| 821 | rtems_cv_sysv_msg, |
---|
| 822 | [ |
---|
| 823 | AC_TRY_RUN([ |
---|
| 824 | #include <sys/types.h> |
---|
| 825 | #include <sys/ipc.h> |
---|
| 826 | #include <sys/msg.h> |
---|
| 827 | int main () { |
---|
| 828 | int id=msgget(IPC_PRIVATE,IPC_CREAT|0400); |
---|
| 829 | if (id == -1) |
---|
| 830 | exit(1); |
---|
| 831 | if (msgctl(id, IPC_RMID, 0) == -1) |
---|
| 832 | exit(1); |
---|
| 833 | exit(0); |
---|
| 834 | } |
---|
| 835 | ], |
---|
| 836 | rtems_cv_sysv_msg="yes", rtems_cv_sysv_msg="no", :) |
---|
| 837 | ]) |
---|
| 838 | ]) |
---|
| 839 | |
---|
| 840 | AC_DEFUN(RTEMS_CHECK_SYSV_UNIX, |
---|
| 841 | [AC_REQUIRE([RTEMS_CANONICAL_HOST]) |
---|
| 842 | if test "$RTEMS_CPU" = "unix" ; then |
---|
| 843 | RTEMS_UNION_SEMUN |
---|
| 844 | RTEMS_SYSV_SEM |
---|
| 845 | if test "$rtems_cv_sysv_sem" != "yes" ; then |
---|
| 846 | AC_MSG_ERROR([System V semaphores don't work, required by simulator]) |
---|
| 847 | fi |
---|
| 848 | RTEMS_SYSV_SHM |
---|
| 849 | if test "$rtems_cv_sysv_shm" != "yes" ; then |
---|
| 850 | AC_MSG_ERROR([System V shared memory doesn't work, required by simulator]) |
---|
| 851 | fi |
---|
| 852 | RTEMS_SYSV_MSG |
---|
| 853 | if test "$rtems_cv_sysv_msg" != "yes" ; then |
---|
| 854 | AC_MSG_ERROR([System V messages don't work, required by simulator]) |
---|
| 855 | fi |
---|
| 856 | fi |
---|
| 857 | ]) |
---|
| 858 | |
---|
| 859 | dnl |
---|
| 860 | dnl $Id$ |
---|
| 861 | dnl |
---|
| 862 | |
---|
| 863 | dnl RTEMS_CHECK_MAKEFILE(path) |
---|
| 864 | dnl Search for Makefile.in's within the directory starting |
---|
| 865 | dnl at path and append an entry for Makefile to global variable |
---|
| 866 | dnl "makefiles" (from configure.in) for each Makefile.in found |
---|
| 867 | dnl |
---|
| 868 | AC_DEFUN(RTEMS_CHECK_MAKEFILE, |
---|
| 869 | [RTEMS_CHECK_FILES_IN($1,Makefile,makefiles) |
---|
| 870 | ]) |
---|
| 871 | |
---|
| 872 | dnl |
---|
| 873 | dnl $Id$ |
---|
| 874 | dnl |
---|
| 875 | |
---|
| 876 | dnl RTEMS_CHECK_FILES_IN(path,file,var) |
---|
| 877 | dnl path .. path relative to srcdir, where to start searching for files |
---|
| 878 | dnl file .. name of the files to search for |
---|
| 879 | dnl var .. shell variable to append files found |
---|
| 880 | |
---|
| 881 | AC_DEFUN(RTEMS_CHECK_FILES_IN, |
---|
| 882 | [ |
---|
| 883 | AC_MSG_CHECKING(for $2.in in $1) |
---|
| 884 | if test -d $srcdir/$1; then |
---|
| 885 | rtems_av_save_dir=`pwd`; |
---|
| 886 | cd $srcdir; |
---|
| 887 | rtems_av_tmp=`find $1 -name "$2.in" -print | sed "s/$2\.in/%/" | sort | sed "s/%/$2/"` |
---|
| 888 | $3="$$3 $rtems_av_tmp"; |
---|
| 889 | cd $rtems_av_save_dir; |
---|
| 890 | AC_MSG_RESULT(done) |
---|
| 891 | else |
---|
| 892 | AC_MSG_RESULT(no) |
---|
| 893 | fi |
---|
| 894 | ]) |
---|
| 895 | |
---|
| 896 | |
---|