Changeset 55837f7 in rtems for acinclude.m4


Ignore:
Timestamp:
Mar 25, 2003, 8:55:26 AM (17 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
8ca2e5b
Parents:
0b22af6
Message:

Merger from rtems-4-6-branch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • acinclude.m4

    r0b22af6 r55837f7  
    2424])
    2525
     26AC_DEFUN([_RTEMS_TOOLS],
     27[
     28m4_ifdef([_RTEMS_$2_CONFIGDIRS_LIST],
     29[
     30_RTEMS_ARG_VAR([CC_FOR_$2],
     31  [c-compiler to be used for $1 subdirs (default: auto-detected)])
     32_RTEMS_ARG_VAR([CFLAGS_FOR_$2],
     33  [c-flags to be used for $1 subdirs (default: provided by autoconf)])
     34_RTEMS_ARG_VAR([CXX_FOR_$2],
     35  [c++-compiler to be used for $1 subdirs (default: auto-detected)])
     36_RTEMS_ARG_VAR([CXXFLAGS_FOR_$2],
     37  [c++-flags to be used for $1 subdirs (default: provided by autoconf)])
     38])
     39])
     40
    2641AC_DEFUN([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS],
    2742[
    2843AC_CONFIG_COMMANDS_PRE([
     44
     45test -z "$host_alias" && host_alias="$host"
     46test -z "$build_alias" && build_alias="$build"
     47test -z "$target_alias" && target_alias="$target"
     48
    2949_RTEMS_BUILD_CONFIG_PREPARE
    3050_RTEMS_HOST_CONFIG_PREPARE
    3151_RTEMS_TARGET_CONFIG_PREPARE
    3252
     53build_SUBDIRS="${build_configdirs}"
     54build_configdirs="${build_configdirs}"
     55
    3356AS_IF([test $build = $host],
    34 [
     57[dnl
    3558  AS_IF([test $host = $target],
    3659  [dnl b=h, h=t, t=b
    37     BUILD_SUBDIRS="${build_configdirs}"
    38     build_configdirs="${build_configdirs}"
    39     HOST_SUBDIRS=""
    40     host_configdirs=""
    41     TARGET_SUBDIRS=""
    42     target_configdirs=""],
     60    host_SUBDIRS="${host_configdirs}"
     61    host_configdirs="${host_configdirs}"
     62    target_SUBDIRS="${target_configdirs}"
     63    target_configdirs="${target_configdirs}"],
    4364  [dnl b=h, h!=t, t!=b
    44     BUILD_SUBDIRS="${build_configdirs}"
    45     build_configdirs="${build_configdirs}"
    46     HOST_SUBDIRS=""
    47     host_configdirs=""
    48     TARGET_SUBDIRS=`echo "${target_configdirs}" | \
     65    host_SUBDIRS="${host_configdirs}"
     66    host_configdirs="${host_configdirs}"
     67    target_SUBDIRS=`echo "${target_configdirs}" | \
    4968      sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"`
    5069    target_configdirs="${target_configdirs}"
    5170  ])
    52 ],[
     71],[dnl
    5372  AS_IF([test $host = $target],
    5473  [ dnl b!=h, h=t, b!=t
    55     BUILD_SUBDIRS="${build_configdirs}"
    56     build_configdirs="${build_configdirs}"
    57     HOST_SUBDIRS=`echo "${host_configdirs}" | \
     74    host_SUBDIRS=`echo "${host_configdirs}" | \
    5875      sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"`
    5976    host_configdirs="${host_configdirs}"
    60     TARGET_SUBDIRS=""
    61     target_configdirs=""],
    62   [
    63     AS_IF([test $build = $target],
    64     [dnl b!=h, h!=t, b=t
    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=""
    71       target_configdirs=""],
    72     [dnl b!=h, h!=t, b!=t
    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}" | \
     77    AS_IF([test x"$enable_experimental" = x"yes" ],[
     78      target_SUBDIRS=`echo "${target_configdirs}" | \
    7979        sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"`
    8080      target_configdirs="${target_configdirs}"
    8181    ])
     82  ],[dnl
     83    AS_IF([test $build = $target],
     84    [dnl b!=h, h!=t, b=t
     85      host_SUBDIRS=`echo "${host_configdirs}" | \
     86        sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"`
     87      host_configdirs="${host_configdirs}"
     88      AS_IF([test x"$enable_experimental" = x"yes" ],[
     89        target_SUBDIRS="${target_configdirs}"
     90        target_configdirs="${target_configdirs}"
     91      ])
     92    ],[dnl b!=h, h!=t, b!=t
     93      host_SUBDIRS=`echo "${host_configdirs}" | \
     94        sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"`
     95      host_configdirs="${host_configdirs}"
     96      AS_IF([test x"$enable_experimental" = x"yes" ],[
     97        target_SUBDIRS=`echo "${target_configdirs}" | \
     98          sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"`
     99        target_configdirs="${target_configdirs}"
     100      ])
     101    ])
    82102  ])
    83103])
    84104
    85 AC_SUBST(HOST_SUBDIRS)
    86 AC_SUBST(TARGET_SUBDIRS)
    87 AC_SUBST(BUILD_SUBDIRS)
     105AC_SUBST(host_SUBDIRS)
     106AC_SUBST(target_SUBDIRS)
     107AC_SUBST(build_SUBDIRS)
    88108])
    89109
     
    161181m4_ifdef([_RTEMS_$2_CONFIGDIRS_LIST],
    162182[
    163 _RTEMS_ARG_VAR([CC_FOR_$2],
    164   [c-compiler to be used for $1 subdirs (default: auto-detected)])
    165 _RTEMS_ARG_VAR([CFLAGS_FOR_$2],
    166   [c-flags to be used for $1 subdirs (default: provided by autoconf)])
    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)])
    171183if test "$no_recursion" != yes; then
    172184
    173  if test -n "${$2_SUBDIRS}"; then
     185 if test -n "${$1_SUBDIRS}"; then
    174186   ac_sub_configure_args="[$]$1args"
    175187
     
    177189  # in subdir configurations.
    178190  ac_sub_configure_args="'--prefix=$prefix' $ac_sub_configure_args"
     191
     192  # make sure that $1_subdir is not empty
     193  test -n "$$1_subdir" || $1_subdir="."
    179194
    180195  case "$$1_subdir" in
     
    184199    ;;
    185200  esac
    186 
    187   # make sure that $1_subdir is not empty
    188   test -n "$$1_subdir" || $1_subdir="."
    189201
    190202  ac_popdir=`pwd`
     
    246258fi
    247259])
    248 ])
    249 
    250 ## PUBLIC: RTEMS_BUILD_CONFIG_SUBDIRS(build_subdir)
    251 # subdirs to be built for the build environment
    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])
    260260])
    261261
     
    312312])
    313313
     314## PUBLIC: RTEMS_BUILD_CONFIG_SUBDIRS(build_subdir)
     315# subdirs to be built for the build environment
     316AC_DEFUN([RTEMS_BUILD_CONFIG_SUBDIRS],[
     317m4_append([_RTEMS_BUILD_CONFIGDIRS_LIST],[ $1])
     318dnl Always append to build_configdirs
     319AC_SUBST(build_configdirs,"$build_configdirs $1")
     320
     321m4_divert_text([DEFAULTS],
     322               [ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"])
     323m4_expand_once([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS])
     324])
     325
    314326AC_DEFUN(_RTEMS_BUILD_CONFIG_PREPARE,[
    315327## # Record the configure arguments in Makefile.
    316328m4_ifdef([_RTEMS_BUILD_CONFIGDIRS_LIST],
    317329[
     330m4_expand_once([_RTEMS_TOOLS([build],[BUILD])])
    318331m4_expand_once([_RTEMS_CONFIGURE_ARGS_PRUNE([buildargs])])
    319332eval buildargs_prune $ac_configure_args
     
    321334test -n "${target_alias}" && \
    322335buildargs="${buildargs} --target='${target_alias}'"
    323 
    324 ## AC_SUBST(buildargs)
    325 
    326336build_subdir="."
    327337],[])
     
    333343m4_append([_RTEMS_HOST_CONFIGDIRS_LIST],[ $1])dnl
    334344
    335 if test $build = $host;
    336 then
    337   AS_IF([test $host = $target],
    338     [_RTEMS_SUBST_IFNOT([build_configdirs],[$1])],
    339     [_RTEMS_SUBST_IFNOT([build_configdirs],[$1])]
    340   )
    341 else
    342   AS_IF([test $host = $target],
    343     [_RTEMS_SUBST_IFNOT([host_configdirs],[$1])],
    344     [AS_IF([test $build = $target],
    345       [_RTEMS_SUBST_IFNOT([host_configdirs],[$1])],
    346       [_RTEMS_SUBST_IFNOT([host_configdirs],[$1])]
    347     )]
    348   )
    349 fi
     345_RTEMS_SUBST_IFNOT([host_configdirs],[$1])
    350346
    351347m4_divert_text([DEFAULTS],
     
    357353m4_ifdef([_RTEMS_HOST_CONFIGDIRS_LIST],
    358354[
    359 ## Record configure arguments in Makefile.
     355m4_expand_once([_RTEMS_TOOLS([host],[HOST])])
    360356m4_expand_once([_RTEMS_CONFIGURE_ARGS_PRUNE([hostargs])])
    361357eval hostargs_prune $ac_configure_args
    362358hostargs="'--host=${host_alias}' '--build=${build}' '--target=${target_alias}' ${hostargs}"
    363 ## AC_SUBST(hostargs)
    364 
    365359host_subdir="${host_alias}"
    366360],[])
     
    372366m4_append([_RTEMS_TARGET_CONFIGDIRS_LIST],[ $1])
    373367
    374 if test $build = $host;
    375 then
    376   AS_IF([test $host = $target],
    377     [_RTEMS_SUBST_IFNOT([build_configdirs],[$1])],
    378     [_RTEMS_SUBST_IFNOT([target_configdirs],[$1])]
    379   )
    380 else
    381   AS_IF([test $host = $target],
    382     [_RTEMS_SUBST_IFNOT([host_configdirs],[$1])],
    383     [AS_IF([test $build = $target],
    384       [_RTEMS_SUBST_IFNOT([build_configdirs],[$1])],
    385       [_RTEMS_SUBST_IFNOT([target_configdirs],[$1])]
    386     )]
    387   )
    388 fi
     368_RTEMS_SUBST_IFNOT([target_configdirs],[$1])
    389369
    390370m4_divert_text([DEFAULTS],
     
    396376m4_ifdef([_RTEMS_TARGET_CONFIGDIRS_LIST],
    397377[
    398 ## Record the configure arguments in Makefile.
     378m4_expand_once([_RTEMS_TOOLS([target],[TARGET])])
    399379m4_expand_once([_RTEMS_CONFIGURE_ARGS_PRUNE([targetargs])])
    400380eval targetargs_prune $ac_configure_args
    401381targetargs="'--host=${target_alias}' '--build=${build}' '--target=${target_alias}' ${targetargs}"
    402 ## AC_SUBST(targetargs)
    403 
    404382target_subdir="${target_alias}"
    405383],[])
Note: See TracChangeset for help on using the changeset viewer.