source: rtems/aclocal/ppc.m4 @ 0a9a0f5

4.104.114.84.95
Last change on this file since 0a9a0f5 was aa7428a, checked in by Ralf Corsepius <ralf.corsepius@…>, on 10/11/02 at 04:28:28

2002-10-11 Ralf Corsepius <corsepiu@…>

  • aclocal/ppc.m4: Apply RTEMS_CONFIGURE_ARGS_QUOTE.
  • Property mode set to 100644
File size: 2.6 KB
Line 
1# $Id$
2#
3# Some hacks for handling powerpc-exception subdirectories
4#
5# Note: Consider this file a temporary band-aid until a better, more general
6# subdirectory handling solution is introduced to RTEMS.
7
8AC_DEFUN([RTEMS_PPC_EXCEPTIONS],
9[
10exceptions="$1_exception_processing"
11AC_SUBST(exceptions)
12
13AC_CONFIG_COMMANDS_POST(
14[
15 exceptions_subdirs="$1_exception_processing"
16 updir=/../support
17
18if test "$no_recursion" != yes; then
19
20  RTEMS_CONFIGURE_ARGS_QUOTE([ac_sub_configure_args])
21
22  for ac_subdir in : $exceptions_subdirs; do test "x$ac_subdir" = x: && continue
23
24    # Do not complain, so a configure script can configure whichever
25    # parts of a large source tree are present.
26    test -d $srcdir${updir}/$ac_subdir || continue
27
28    AC_MSG_NOTICE([configuring in $ac_subdir])
29    case $srcdir in
30    .) ;;
31    *) AS_MKDIR_P(["./$ac_subdir"])
32       if test -d ./$ac_subdir; then :;
33       else
34         AC_MSG_ERROR([cannot create `pwd`/$ac_subdir])
35       fi
36       ;;
37    esac
38
39    ac_popdir=`pwd`
40    cd $ac_subdir
41
42    # A "../" for each directory in /$ac_subdir.
43    ac_dots=`echo $ac_subdir |
44             sed 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g'`
45
46    case $srcdir in
47    .) # No --srcdir option.  We are building in place.
48      ac_sub_srcdir=$srcdir${updir} ;;
49    [[\\/]]* | ?:[[\\/]]* ) # Absolute path.
50      ac_sub_srcdir=$srcdir${updir}/$ac_subdir ;;
51    *) # Relative path.
52      ac_sub_srcdir=$ac_dots$srcdir${updir}/$ac_subdir ;;
53    esac
54
55    # Check for guested configure; otherwise get Cygnus style configure.
56    if test -f $ac_sub_srcdir/configure.gnu; then
57      ac_sub_configure="$SHELL '$ac_sub_srcdir/configure.gnu'"
58    elif test -f $ac_sub_srcdir/configure; then
59      ac_sub_configure="$SHELL '$ac_sub_srcdir/configure'"
60    elif test -f $ac_sub_srcdir/configure.in; then
61      ac_sub_configure=$ac_configure
62    else
63      AC_MSG_WARN([no configuration information is in $ac_subdir])
64      ac_sub_configure=
65    fi
66
67    # The recursion is here.
68    if test -n "$ac_sub_configure"; then
69      # Make the cache file name correct relative to the subdirectory.
70      case $cache_file in
71      [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
72      *) # Relative path.
73        ac_sub_cache_file=$ac_dots$cache_file ;;
74      esac
75
76      AC_MSG_NOTICE([running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir])
77      # The eval makes quoting arguments work.
78      eval $ac_sub_configure $ac_sub_configure_args \
79           --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir ||
80        AC_MSG_ERROR([$ac_sub_configure failed for $ac_subdir])
81    fi
82
83    cd $ac_popdir
84  done
85fi
86])
87])
Note: See TracBrowser for help on using the repository browser.