source: rtems/c/src/acinclude.m4 @ ff8676ef

4.104.114.84.95
Last change on this file since ff8676ef was dbaca2a7, checked in by Ralf Corsepius <ralf.corsepius@…>, on 07/22/02 at 09:22:54

2002-07-22 Ralf Corsepius <corsepiu@…>

  • acinclude.m4: Add test "$multilib" != "yes".
  • config-ml.in: Remove.
  • Property mode set to 100644
File size: 3.4 KB
Line 
1# $Id$
2#
3# Some hacks for handling special config 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_CONFIG_SUBDIR],
9[
10AC_CONFIG_COMMANDS_POST(
11[
12if test "$multilib" != "yes"; then
13 ac_sub_sourcedir=$2
14 ac_sub_builddir=$1
15
16if test "$no_recursion" != yes; then
17
18  # Remove --cache-file and --srcdir arguments so they do not pile up.
19  ac_sub_configure_args=
20  ac_prev=
21  for ac_arg in $ac_configure_args; do
22    if test -n "$ac_prev"; then
23      ac_prev=
24      continue
25    fi
26    case $ac_arg in
27    -cache-file | --cache-file | --cache-fil | --cache-fi \
28    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
29      ac_prev=cache_file ;;
30    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
31    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
32    | --c=*)
33      ;;
34    --config-cache | -C)
35      ;;
36    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
37      ac_prev=srcdir ;;
38    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
39      ;;
40    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
41    esac
42  done
43
44  ac_sub_configure_args="$ac_sub_configure_args $3"
45
46  for ac_subdir in : $ac_sub_sourcedir; do test "x$ac_subdir" = x: && continue
47
48    # Do not complain, so a configure script can configure whichever
49    # parts of a large source tree are present.
50    test -d $srcdir/$ac_subdir || continue
51
52    AC_MSG_NOTICE([configuring in $ac_subdir])
53    case $srcdir in
54    .) ;;
55    *) AS_MKDIR_P(["./$ac_sub_builddir"])
56       if test -d ./$ac_sub_builddir; then :;
57       else
58         AC_MSG_ERROR([cannot create `pwd`/$ac_sub_builddir])
59       fi
60       ;;
61    esac
62
63    ac_popdir=`pwd`
64    cd $ac_sub_builddir
65
66    # A "../" for each directory in /$ac_subdir.
67    ac_dots=`echo $ac_sub_builddir |
68             sed 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g'`
69
70    case $srcdir in
71    .) # No --srcdir option.  We are building in place.
72      ac_sub_srcdir=$srcdir${ac_subdir} ;;
73    [[\\/]]* | ?:[[\\/]]* ) # Absolute path.
74      ac_sub_srcdir=$srcdir/$ac_subdir ;;
75    *) # Relative path.
76      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
77    esac
78
79    # Check for guested configure; otherwise get Cygnus style configure.
80    if test -f $ac_sub_srcdir/configure.gnu; then
81      ac_sub_configure="$SHELL '$ac_sub_srcdir/configure.gnu'"
82    elif test -f $ac_sub_srcdir/configure; then
83      ac_sub_configure="$SHELL '$ac_sub_srcdir/configure'"
84    elif test -f $ac_sub_srcdir/configure.in; then
85      ac_sub_configure=$ac_configure
86    else
87      AC_MSG_WARN([no configuration information is in $ac_subdir])
88      ac_sub_configure=
89    fi
90
91    # The recursion is here.
92    if test -n "$ac_sub_configure"; then
93      # Make the cache file name correct relative to the subdirectory.
94      case $cache_file in
95      [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
96      *) # Relative path.
97        ac_sub_cache_file=$ac_dots$cache_file ;;
98      esac
99
100      AC_MSG_NOTICE([running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir])
101      # The eval makes quoting arguments work.
102      eval $ac_sub_configure $ac_sub_configure_args \
103           --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir ||
104        AC_MSG_ERROR([$ac_sub_configure failed for $ac_subdir])
105    fi
106
107    cd $ac_popdir
108  done
109fi
110fi
111])
112])
Note: See TracBrowser for help on using the repository browser.