source: rtems/aclocal.m4 @ 3a7782b

4.104.114.84.95
Last change on this file since 3a7782b was 2f03a608, checked in by Joel Sherrill <joel.sherrill@…>, on 01/15/98 at 22:48:30

Patch from Ralf Corsepius <corsepiu@…>:

RTEMS_CHECK_FILES_IN uses a sequence of find, sort and sed to collect
all *.in files in a given subdirectory.

The current version uses : `find $1 -name $2 -print | sed 's%\.in%%' |
sort` with $1 being a subdirectory $2 set to Makefile.in.

This works as long all subdirectories start with a letter that is
lexically bigger than the letter M, but will fail otherwise.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1dnl some macros for rtems host configuration checks
2dnl
3dnl Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de), 97/11/29
4dnl
5dnl Last Modified: 98/01/10
6dnl
7
8dnl macro to detect mkdir
9AC_DEFUN(RTEMS_PATH_MKDIR,
10[AC_PATH_PROG(MKDIR,mkdir)
11])
12
13dnl macro to check for mkdir -p
14AC_DEFUN(RTEMS_PROG_MKDIR_P,
15[
16AC_REQUIRE([RTEMS_PATH_MKDIR])
17AC_MSG_CHECKING([for working $MKDIR -p])
18AC_CACHE_VAL(rtems_cv_prog_mkdir_p,
19[rm -rf conftestdata
20if $MKDIR -p conftestdata 2>/dev/null ;then
21rtems_cv_prog_MKDIR_P="yes"
22else
23rtems_cv_prog_MKDIR_P="no"
24fi])dnl
25rm -rf conftestdata
26AC_MSG_RESULT($rtems_cv_prog_MKDIR_P)
27])
28
29dnl macro to check for mkdir -m 0755
30AC_DEFUN(RTEMS_PROG_MKDIR_M,
31[
32AC_REQUIRE([RTEMS_PATH_MKDIR])
33AC_MSG_CHECKING([for working $MKDIR -m 0755])
34AC_CACHE_VAL(rtems_cv_prog_MKDIR_P,
35[rm -rf conftestdata
36if $MKDIR -m 0775 conftestdata 2>/dev/null; then
37rtems_cv_prog_MKDIR_M="yes"
38else
39rtems_cv_prog_MKDIR_M="no"
40fi])dnl
41rm -rf conftestdata
42AC_MSG_RESULT($rtems_cv_prog_MKDIR_M)
43])
44
45dnl RTEMS_CHECK_FILES_IN(path,file,var)
46dnl path .. path relative to srcdir, where to start searching for files
47dnl file .. name of the files to search for
48dnl var  .. shell variable to append found files
49AC_DEFUN(RTEMS_CHECK_FILES_IN,
50[
51AC_MSG_CHECKING(for $2.in in $1)
52if test -d $srcdir/$1; then
53  rtems_av_save_dir=`pwd`;
54  cd $srcdir;
55  rtems_av_tmp=`find $1 -name "$2.in" -print | sed "s/$2\.in/%/" | sort | sed "s/%/$2/"`
56  $3="$$3 $rtems_av_tmp";
57  cd $rtems_av_save_dir;
58  AC_MSG_RESULT(done)
59else
60  AC_MSG_RESULT(no)
61fi
62])
63
64dnl RTEMS_CHECK_MAKEFILE(path)
65dnl Search for Makefile.in's within the directory starting
66dnl at path and append an entry for Makefile to global variable
67dnl "makefiles" (from configure.in) for each Makefile.in found
68dnl
69AC_DEFUN(RTEMS_CHECK_MAKEFILE,
70[RTEMS_CHECK_FILES_IN($1,Makefile,makefiles)
71])
72
73dnl canonicalize target name
74dnl NOTE: Most rtems targets do not fullfil autoconf's
75dnl target naming conventions "processor-vendor-os"
76dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
77dnl and we have to fix it for rtems ourselves
78
79AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
80[AC_MSG_CHECKING(rtems target cpu)
81changequote(<<, >>)dnl
82target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
83changequote([, ])dnl
84AC_MSG_RESULT($target_cpu)
85])
Note: See TracBrowser for help on using the repository browser.