[a0ea6f1] | 1 | ## All directories belong in one of 3 categories. |
---|
[ba748523] | 2 | ## ${HOST_CONFIGDIRS_LIST} is directories we build using the host tools. |
---|
| 3 | ## ${TARGET_CONFIGDIRS_LIST} is directories we build using the target tools. |
---|
| 4 | ## ${BUILD_CONFIGDIRS_LIST} is directories we build using the build tools |
---|
| 5 | |
---|
| 6 | |
---|
| 7 | dnl RTEMS_ARG_VAR(VAR,HELP-STRING) |
---|
| 8 | dnl An internal macros to have help strings pretty |
---|
| 9 | dnl printed with configure --help, without letting autoconf spoil config subdir |
---|
| 10 | dnl environments by trying to propagate them |
---|
| 11 | dnl Stripped down version of autoconf-2.52's AC_ARG_VAR. |
---|
| 12 | |
---|
| 13 | AC_DEFUN([_RTEMS_ARG_VAR], |
---|
| 14 | [ |
---|
| 15 | m4_expand_once([m4_divert_once([HELP_VAR], |
---|
| 16 | [AC_HELP_STRING([$1], [$2], [ ])])], |
---|
| 17 | [$0($1)])dnl |
---|
| 18 | ]) |
---|
| 19 | |
---|
| 20 | AC_DEFUN([_RTEMS_SUBST_IFNOT], |
---|
| 21 | [AS_IF([`echo " [$]$1 " | grep " $2 " > /dev/null`], |
---|
| 22 | [], |
---|
| 23 | [AC_SUBST([$1],["[$]$1 $2"])]) |
---|
| 24 | ]) |
---|
| 25 | |
---|
| 26 | AC_DEFUN([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS], |
---|
| 27 | [ |
---|
| 28 | AC_CONFIG_COMMANDS_PRE([ |
---|
| 29 | _RTEMS_BUILD_CONFIG_PREPARE |
---|
| 30 | _RTEMS_HOST_CONFIG_PREPARE |
---|
| 31 | _RTEMS_TARGET_CONFIG_PREPARE |
---|
| 32 | |
---|
[a0ea6f1] | 33 | AS_IF([test $build = $host], |
---|
| 34 | [ |
---|
| 35 | AS_IF([test $host = $target], |
---|
| 36 | [dnl b=h, h=t, t=b |
---|
[ba748523] | 37 | BUILD_SUBDIRS="${build_configdirs}" |
---|
| 38 | build_configdirs="${build_configdirs}" |
---|
| 39 | HOST_SUBDIRS="" |
---|
| 40 | host_configdirs="" |
---|
| 41 | TARGET_SUBDIRS="" |
---|
[a0ea6f1] | 42 | target_configdirs=""], |
---|
| 43 | [dnl b=h, h!=t, t!=b |
---|
[ba748523] | 44 | BUILD_SUBDIRS="${build_configdirs}" |
---|
| 45 | build_configdirs="${build_configdirs}" |
---|
| 46 | HOST_SUBDIRS="" |
---|
| 47 | host_configdirs="" |
---|
| 48 | TARGET_SUBDIRS=`echo "${target_configdirs}" | \ |
---|
| 49 | sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"` |
---|
| 50 | target_configdirs="${target_configdirs}" |
---|
[a0ea6f1] | 51 | ]) |
---|
| 52 | ],[ |
---|
| 53 | AS_IF([test $host = $target], |
---|
| 54 | [ dnl b!=h, h=t, b!=t |
---|
[ba748523] | 55 | BUILD_SUBDIRS="${build_configdirs}" |
---|
| 56 | build_configdirs="${build_configdirs}" |
---|
| 57 | HOST_SUBDIRS=`echo "${host_configdirs}" | \ |
---|
| 58 | sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"` |
---|
| 59 | host_configdirs="${host_configdirs}" |
---|
| 60 | TARGET_SUBDIRS="" |
---|
[a0ea6f1] | 61 | target_configdirs=""], |
---|
| 62 | [ |
---|
| 63 | AS_IF([test $build = $target], |
---|
| 64 | [dnl b!=h, h!=t, b=t |
---|
[ba748523] | 65 | BUILD_SUBDIRS="${build_configdirs}" |
---|
| 66 | build_configdirs="${build_configdirs}" |
---|
| 67 | HOST_SUBDIRS=`echo "${host_configdirs}" | \ |
---|
| 68 | sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"` |
---|
| 69 | host_configdirs="${host_configdirs}" |
---|
| 70 | TARGET_SUBDIRS="" |
---|
[a0ea6f1] | 71 | target_configdirs=""], |
---|
| 72 | [dnl b!=h, h!=t, b!=t |
---|
[ba748523] | 73 | BUILD_SUBDIRS="${build_configdirs}" |
---|
| 74 | build_configdirs="${build_configdirs}" |
---|
| 75 | HOST_SUBDIRS=`echo "${host_configdirs}" | \ |
---|
| 76 | sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"` |
---|
| 77 | host_configdirs="${host_configdirs}" |
---|
| 78 | TARGET_SUBDIRS=`echo "${target_configdirs}" | \ |
---|
| 79 | sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"` |
---|
| 80 | target_configdirs="${target_configdirs}" |
---|
[a0ea6f1] | 81 | ]) |
---|
| 82 | ]) |
---|
| 83 | ]) |
---|
[ba748523] | 84 | |
---|
| 85 | AC_SUBST(HOST_SUBDIRS) |
---|
| 86 | AC_SUBST(TARGET_SUBDIRS) |
---|
| 87 | AC_SUBST(BUILD_SUBDIRS) |
---|
| 88 | ]) |
---|
| 89 | |
---|
| 90 | AC_CONFIG_COMMANDS_POST([ |
---|
| 91 | _RTEMS_OUTPUT_SUBDIRS([build],[BUILD]) |
---|
| 92 | _RTEMS_OUTPUT_SUBDIRS([host],[HOST]) |
---|
| 93 | _RTEMS_OUTPUT_SUBDIRS([target],[TARGET]) |
---|
| 94 | ]) |
---|
| 95 | ]) |
---|
| 96 | |
---|
| 97 | dnl _RTEMS_SRCPATHS(BUILD-DIR-NAME) |
---|
| 98 | dnl ---------------------------- |
---|
| 99 | dnl Inputs: |
---|
| 100 | dnl - BUILD-DIR-NAME is `top-build -> build' and `top-src -> src' |
---|
| 101 | dnl - `$srcdir' is `top-build -> top-src' |
---|
| 102 | dnl |
---|
| 103 | dnl Outputs: |
---|
| 104 | dnl - `ac_builddir' is `.', for symmetry only. |
---|
| 105 | dnl - `ac_top_builddir' is `build -> top_build'. |
---|
| 106 | dnl If not empty, has a trailing slash. |
---|
| 107 | dnl - `ac_srcdir' is `build -> src'. |
---|
| 108 | dnl - `ac_top_srcdir' is `build -> top-src'. |
---|
| 109 | dnl |
---|
| 110 | dnl and `ac_buildpath' etc., the absolute paths. |
---|
| 111 | m4_define([_RTEMS_SRCPATHS], |
---|
| 112 | [ |
---|
| 113 | m4_if([$2],, |
---|
| 114 | [dstdir=$1], |
---|
| 115 | [case "$2" in |
---|
| 116 | "." | "" ) # No subdir was given |
---|
| 117 | dstdir=$1;; |
---|
| 118 | * ) # A subdir was given |
---|
| 119 | dstdir=$2/$1;; |
---|
| 120 | esac]) |
---|
| 121 | ac_builddir=. |
---|
| 122 | |
---|
[a0ea6f1] | 123 | AS_IF([test $dstdir != .], |
---|
| 124 | [ # Strip off leading ./ |
---|
[ba748523] | 125 | ac_builddir_suffix=/`echo $dstdir | sed 's,^\.[[\\/]],,'` |
---|
| 126 | ac_srcdir_suffix=/`echo $1 | sed 's,^\.[[\\/]],,'` |
---|
| 127 | # A "../" for each directory in $ac_dir_suffix. |
---|
| 128 | ac_top_builddir=`echo "$ac_builddir_suffix" | sed 's,/[[^\\/]]*,../,g'` |
---|
[a0ea6f1] | 129 | ],[ |
---|
[ba748523] | 130 | ac_dir_suffix= ac_top_builddir= |
---|
[a0ea6f1] | 131 | ]) |
---|
[ba748523] | 132 | |
---|
| 133 | case $srcdir in |
---|
| 134 | .) # No --srcdir option. We are building in place. |
---|
| 135 | ac_srcdir=. |
---|
| 136 | if test -z "$ac_top_builddir"; then |
---|
| 137 | ac_top_srcdir=. |
---|
| 138 | else |
---|
| 139 | ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` |
---|
| 140 | fi ;; |
---|
| 141 | [[\\/]]* | ?:[[\\/]]* ) # Absolute path. |
---|
| 142 | ac_srcdir=$srcdir$ac_srcdir_suffix; |
---|
| 143 | ac_top_srcdir=$srcdir; |
---|
| 144 | ;; |
---|
| 145 | *) # Relative path. |
---|
| 146 | ac_srcdir=$ac_top_builddir$srcdir$ac_srcdir_suffix; |
---|
| 147 | ac_top_srcdir=$ac_top_builddir$srcdir; |
---|
| 148 | ;; |
---|
| 149 | esac |
---|
| 150 | dnl Don't blindly perform a `cd $1/$ac_foo && pwd` since $ac_foo can be |
---|
| 151 | dnl absolute. |
---|
| 152 | |
---|
| 153 | ac_buildpath=`cd $dstdir && cd $ac_builddir && pwd` |
---|
| 154 | ac_top_buildpath=`cd $dstdir && cd $ac_top_builddir && pwd` |
---|
| 155 | ac_srcpath=`cd $dstdir && cd $ac_srcdir && pwd` |
---|
| 156 | ac_top_srcpath=`cd $dstdir && cd $ac_top_srcdir && pwd` |
---|
| 157 | ])# _AC_SRCPATHS |
---|
| 158 | |
---|
| 159 | dnl _RTEMS_OUTPUT_SUBDIRS([host|target|build],[HOST|TARGET|BUILD]) |
---|
| 160 | AC_DEFUN([_RTEMS_OUTPUT_SUBDIRS],[ |
---|
| 161 | m4_ifdef([_RTEMS_$2_CONFIGDIRS_LIST], |
---|
| 162 | [ |
---|
| 163 | _RTEMS_ARG_VAR([CC_FOR_$2], |
---|
| 164 | [c-compiler to be used for $1 subdirs (default: auto-detected)]) |
---|
[b4cde04] | 165 | _RTEMS_ARG_VAR([CFLAGS_FOR_$2], |
---|
| 166 | [c-flags to be used for $1 subdirs (default: provided by autoconf)]) |
---|
[f289c09] | 167 | _RTEMS_ARG_VAR([CXX_FOR_$2], |
---|
| 168 | [c++-compiler to be used for $1 subdirs (default: auto-detected)]) |
---|
| 169 | _RTEMS_ARG_VAR([CXXFLAGS_FOR_$2], |
---|
| 170 | [c++-flags to be used for $1 subdirs (default: provided by autoconf)]) |
---|
[ba748523] | 171 | if test "$no_recursion" != yes; then |
---|
| 172 | |
---|
| 173 | if test -n "${$2_SUBDIRS}"; then |
---|
[9e4d710] | 174 | ac_sub_configure_args="[$]$1args" |
---|
[ba748523] | 175 | |
---|
[9b11632] | 176 | # Always prepend --prefix to ensure using the same prefix |
---|
| 177 | # in subdir configurations. |
---|
[9cf7774] | 178 | ac_sub_configure_args="'--prefix=$prefix' $ac_sub_configure_args" |
---|
[9b11632] | 179 | |
---|
[ba748523] | 180 | case "$$1_subdir" in |
---|
| 181 | "." ) ;; |
---|
| 182 | * ) |
---|
[9cf7774] | 183 | ac_sub_configure_args="$ac_sub_configure_args '--with-target-subdir=$$1_subdir' '--exec-prefix=${prefix}/$$1_subdir'" |
---|
[ba748523] | 184 | ;; |
---|
| 185 | esac |
---|
| 186 | |
---|
| 187 | # make sure that $1_subdir is not empty |
---|
| 188 | test -n "$$1_subdir" || $1_subdir="." |
---|
| 189 | |
---|
| 190 | ac_popdir=`pwd` |
---|
| 191 | for ac_dir in $$1_configdirs; do |
---|
| 192 | |
---|
| 193 | # Do not complain, so a configure script can configure whichever |
---|
| 194 | # parts of a large source tree are present. |
---|
| 195 | test -d $srcdir/$ac_dir || continue |
---|
| 196 | |
---|
| 197 | AC_MSG_NOTICE([configuring in $$1_subdir/$ac_dir]) |
---|
| 198 | AS_MKDIR_P(["$$1_subdir/$ac_dir"]) |
---|
| 199 | _RTEMS_SRCPATHS(["$ac_dir"],["$$1_subdir"]) |
---|
| 200 | |
---|
| 201 | cd $$1_subdir/$ac_dir |
---|
| 202 | |
---|
| 203 | # Check for guested configure; otherwise get Cygnus style configure. |
---|
| 204 | if test -f $ac_srcdir/configure.gnu; then |
---|
| 205 | ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'" |
---|
| 206 | elif test -f $ac_srcdir/configure; then |
---|
| 207 | ac_sub_configure="$SHELL '$ac_srcdir/configure'" |
---|
| 208 | elif test -f $ac_srcdir/configure.in; then |
---|
| 209 | ac_sub_configure=$ac_configure |
---|
| 210 | else |
---|
| 211 | AC_MSG_WARN([no configuration information is in $ac_dir]) |
---|
| 212 | ac_sub_configure= |
---|
| 213 | fi |
---|
| 214 | |
---|
| 215 | # The recursion is here. |
---|
| 216 | if test -n "$ac_sub_configure"; then |
---|
| 217 | # Make the cache file name correct relative to the subdirectory. |
---|
| 218 | case $cache_file in |
---|
| 219 | [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;; |
---|
| 220 | *) # Relative path. |
---|
| 221 | ac_sub_cache_file=$ac_top_builddir$cache_file ;; |
---|
| 222 | esac |
---|
| 223 | |
---|
[b4cde04] | 224 | ac_sub_configure_vars= |
---|
[9e4d710] | 225 | ac_sub_configure_vars="$ac_sub_configure_vars '--cache-file=$ac_sub_cache_file'" |
---|
| 226 | ac_sub_configure_vars="$ac_sub_configure_vars '--srcdir=$ac_srcdir'" |
---|
| 227 | |
---|
[b4cde04] | 228 | test -n "[$]CC_FOR_$2" && \ |
---|
[9e4d710] | 229 | ac_sub_configure_vars="$ac_sub_configure_vars 'CC=[$]CC_FOR_$2'" |
---|
[f289c09] | 230 | test -n "[$]CXX_FOR_$2" && \ |
---|
| 231 | ac_sub_configure_vars="$ac_sub_configure_vars 'CXX=[$]CXX_FOR_$2'" |
---|
[b4cde04] | 232 | test -n "[$]CFLAGS_FOR_$2" && \ |
---|
[9cf7774] | 233 | ac_sub_configure_vars="$ac_sub_configure_vars 'CFLAGS=[$]CFLAGS_FOR_$2'" |
---|
[f289c09] | 234 | test -n "[$]CXXFLAGS_FOR_$2" && \ |
---|
| 235 | ac_sub_configure_vars="$ac_sub_configure_vars 'CXXFLAGS=[$]CXXFLAGS_FOR_$2'" |
---|
[6a31b7c0] | 236 | |
---|
[9e4d710] | 237 | # The eval makes quoting arguments work. |
---|
[6a31b7c0] | 238 | AC_MSG_NOTICE([running $ac_sub_configure $ac_sub_configure_args $ac_sub_configure_vars]) |
---|
| 239 | eval $ac_sub_configure $ac_sub_configure_args $ac_sub_configure_vars || |
---|
[ba748523] | 240 | AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir]) |
---|
| 241 | fi |
---|
| 242 | |
---|
| 243 | cd $ac_popdir |
---|
| 244 | done |
---|
| 245 | fi |
---|
| 246 | fi |
---|
| 247 | ]) |
---|
| 248 | ]) |
---|
| 249 | |
---|
| 250 | ## PUBLIC: RTEMS_BUILD_CONFIG_SUBDIRS(build_subdir) |
---|
[a0ea6f1] | 251 | # subdirs to be built for the build environment |
---|
[ba748523] | 252 | AC_DEFUN([RTEMS_BUILD_CONFIG_SUBDIRS],[ |
---|
| 253 | m4_append([_RTEMS_BUILD_CONFIGDIRS_LIST],[ $1]) |
---|
| 254 | dnl Always append to build_configdirs |
---|
| 255 | AC_SUBST(build_configdirs,"$build_configdirs $1") |
---|
| 256 | |
---|
| 257 | m4_divert_text([DEFAULTS], |
---|
| 258 | [ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"]) |
---|
| 259 | m4_expand_once([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS]) |
---|
| 260 | ]) |
---|
| 261 | |
---|
[9cf7774] | 262 | AC_DEFUN([_RTEMS_CONFIGURE_ARGS_PRUNE], |
---|
| 263 | [ |
---|
[9e4d710] | 264 | $1_prune() |
---|
| 265 | { |
---|
| 266 | $1= |
---|
| 267 | for ac_arg |
---|
| 268 | do |
---|
[9cf7774] | 269 | if test -n "$ac_prev"; then |
---|
| 270 | ac_prev= |
---|
[f289c09] | 271 | continue |
---|
[9cf7774] | 272 | fi |
---|
[9e4d710] | 273 | case $ac_arg in |
---|
| 274 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
---|
| 275 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
---|
| 276 | ac_prev=cache_file ;; |
---|
| 277 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
---|
| 278 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
---|
| 279 | | --c=*) |
---|
| 280 | ;; |
---|
| 281 | --config-cache | -C) |
---|
| 282 | ;; |
---|
| 283 | |
---|
| 284 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
---|
| 285 | ac_prev=srcdir ;; |
---|
| 286 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
---|
| 287 | ;; |
---|
| 288 | |
---|
[9cf7774] | 289 | -host* | --host* );; |
---|
[9e4d710] | 290 | -host | --host ) |
---|
| 291 | ac_prev=host_alias;; |
---|
[9cf7774] | 292 | -target* | --target* );; |
---|
[9e4d710] | 293 | -target | --target ) |
---|
| 294 | ac_prev=target_alias;; |
---|
[9cf7774] | 295 | -build* | --build* );; |
---|
[9e4d710] | 296 | -build | --build ) |
---|
| 297 | ac_prev=build_alias;; |
---|
| 298 | |
---|
| 299 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
---|
| 300 | ac_prev=prefix ;; |
---|
| 301 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
---|
| 302 | ;; |
---|
| 303 | |
---|
[9cf7774] | 304 | *_alias=* );; |
---|
[9e4d710] | 305 | |
---|
[9cf7774] | 306 | m4_if([$2],,,[$2]) |
---|
| 307 | *) $1="$$1 '$ac_arg'" ;; |
---|
| 308 | esac |
---|
| 309 | done |
---|
[9e4d710] | 310 | export $1 |
---|
| 311 | } |
---|
[9cf7774] | 312 | ]) |
---|
| 313 | |
---|
[ba748523] | 314 | AC_DEFUN(_RTEMS_BUILD_CONFIG_PREPARE,[ |
---|
[9e4d710] | 315 | ## # Record the configure arguments in Makefile. |
---|
[ba748523] | 316 | m4_ifdef([_RTEMS_BUILD_CONFIGDIRS_LIST], |
---|
| 317 | [ |
---|
[9e4d710] | 318 | m4_expand_once([_RTEMS_CONFIGURE_ARGS_PRUNE([buildargs])]) |
---|
| 319 | eval buildargs_prune $ac_configure_args |
---|
[9cf7774] | 320 | buildargs="'--host=${build}' '--build=${build}' '--target=${target_alias}' ${buildargs}" |
---|
[9e4d710] | 321 | ## AC_SUBST(buildargs) |
---|
[ba748523] | 322 | |
---|
| 323 | build_subdir="." |
---|
| 324 | ],[]) |
---|
| 325 | ]) |
---|
| 326 | |
---|
[a0ea6f1] | 327 | ## PUBLIC: RTEMS_HOST_CONFIG_SUBDIRS(host_subdir) |
---|
| 328 | # subdirs to be build for the host environment |
---|
[ba748523] | 329 | AC_DEFUN([RTEMS_HOST_CONFIG_SUBDIRS],[ |
---|
| 330 | m4_append([_RTEMS_HOST_CONFIGDIRS_LIST],[ $1])dnl |
---|
| 331 | |
---|
| 332 | if test $build = $host; |
---|
| 333 | then |
---|
[bcf4d5bc] | 334 | AS_IF([test $host = $target], |
---|
| 335 | [_RTEMS_SUBST_IFNOT([build_configdirs],[$1])], |
---|
| 336 | [_RTEMS_SUBST_IFNOT([build_configdirs],[$1])] |
---|
| 337 | ) |
---|
[ba748523] | 338 | else |
---|
[bcf4d5bc] | 339 | AS_IF([test $host = $target], |
---|
| 340 | [_RTEMS_SUBST_IFNOT([host_configdirs],[$1])], |
---|
| 341 | [AS_IF([test $build = $target], |
---|
| 342 | [_RTEMS_SUBST_IFNOT([host_configdirs],[$1])], |
---|
| 343 | [_RTEMS_SUBST_IFNOT([host_configdirs],[$1])] |
---|
| 344 | )] |
---|
| 345 | ) |
---|
[ba748523] | 346 | fi |
---|
| 347 | |
---|
| 348 | m4_divert_text([DEFAULTS], |
---|
| 349 | [ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"]) |
---|
| 350 | m4_expand_once([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS]) |
---|
| 351 | ]) |
---|
| 352 | |
---|
| 353 | AC_DEFUN(_RTEMS_HOST_CONFIG_PREPARE,[ |
---|
| 354 | m4_ifdef([_RTEMS_HOST_CONFIGDIRS_LIST], |
---|
| 355 | [ |
---|
[9e4d710] | 356 | ## Record configure arguments in Makefile. |
---|
| 357 | m4_expand_once([_RTEMS_CONFIGURE_ARGS_PRUNE([hostargs])]) |
---|
| 358 | eval hostargs_prune $ac_configure_args |
---|
[9cf7774] | 359 | hostargs="'--host=${host_alias}' '--build=${build}' '--target=${target_alias}' ${hostargs}" |
---|
[9e4d710] | 360 | ## AC_SUBST(hostargs) |
---|
[ba748523] | 361 | |
---|
| 362 | host_subdir="${host_alias}" |
---|
| 363 | ],[]) |
---|
| 364 | ]) |
---|
| 365 | |
---|
[a0ea6f1] | 366 | ## PUBLIC: RTEMS_TARGET_CONFIG_SUBDIRS(target_subdir) |
---|
| 367 | # subdirs to be build for the target environment |
---|
[ba748523] | 368 | AC_DEFUN([RTEMS_TARGET_CONFIG_SUBDIRS],[ |
---|
| 369 | m4_append([_RTEMS_TARGET_CONFIGDIRS_LIST],[ $1]) |
---|
| 370 | |
---|
| 371 | if test $build = $host; |
---|
| 372 | then |
---|
[bcf4d5bc] | 373 | AS_IF([test $host = $target], |
---|
| 374 | [_RTEMS_SUBST_IFNOT([build_configdirs],[$1])], |
---|
| 375 | [_RTEMS_SUBST_IFNOT([target_configdirs],[$1])] |
---|
| 376 | ) |
---|
[ba748523] | 377 | else |
---|
[bcf4d5bc] | 378 | AS_IF([test $host = $target], |
---|
| 379 | [_RTEMS_SUBST_IFNOT([host_configdirs],[$1])], |
---|
| 380 | [AS_IF([test $build = $target], |
---|
| 381 | [_RTEMS_SUBST_IFNOT([build_configdirs],[$1])], |
---|
| 382 | [_RTEMS_SUBST_IFNOT([target_configdirs],[$1])] |
---|
| 383 | )] |
---|
| 384 | ) |
---|
[ba748523] | 385 | fi |
---|
| 386 | |
---|
| 387 | m4_divert_text([DEFAULTS], |
---|
| 388 | [ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"]) |
---|
| 389 | m4_expand_once([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS]) |
---|
| 390 | ]) |
---|
| 391 | |
---|
| 392 | AC_DEFUN(_RTEMS_TARGET_CONFIG_PREPARE,[ |
---|
| 393 | m4_ifdef([_RTEMS_TARGET_CONFIGDIRS_LIST], |
---|
| 394 | [ |
---|
[9e4d710] | 395 | ## Record the configure arguments in Makefile. |
---|
| 396 | m4_expand_once([_RTEMS_CONFIGURE_ARGS_PRUNE([targetargs])]) |
---|
| 397 | eval targetargs_prune $ac_configure_args |
---|
[9cf7774] | 398 | targetargs="'--host=${target_alias}' '--build=${build}' '--target=${target_alias}' ${targetargs}" |
---|
[9e4d710] | 399 | ## AC_SUBST(targetargs) |
---|
[ba748523] | 400 | |
---|
| 401 | target_subdir="${target_alias}" |
---|
| 402 | ],[]) |
---|
| 403 | ]) |
---|