source: rtems/aclocal.m4 @ 1587af6

4.104.114.84.95
Last change on this file since 1587af6 was af231b4, checked in by Joel Sherrill <joel.sherrill@…>, on Dec 6, 1997 at 3:43:26 PM

Removed need for -follow option to find.

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