source: rtems/aclocal.m4 @ e619c28

4.104.114.84.95
Last change on this file since e619c28 was 9ec96478, checked in by Joel Sherrill <joel.sherrill@…>, on 03/19/99 at 21:54:36

Towards automake VIII patch from Ralf Corsepius <corsepiu@…>:

OK, I 've made up my mind to cut a big chunk of my automake-patches (:-).

Below you can find a drop-in replacement of the aclocal directory. It
contains a lot of new macro files, most of them are directly cut from rtems
top-level configure script, some are new some are identical to former
versions. The motivation behind these files is to reuse parts from rtems
current top-level configure.in script in up-coming subdirectory configure.in
scripts.

I'd like to ask you to untar the archive ontop of the source tree and to
add/commit these files to CVS. Adding these files should not have any
influence on RTEMS momentary configuration (except of you are required to
run aclocal -I aclocal && autoconf afterwards), because most of them
currently are not used at all.

---------

BTW: Please upgrade to autoconf-2.13 and automake-2.4, if you havn't done
this already (egcs/CVS require them, too). My upcoming automake files
require automake-2.4 which requires autoconf-2.13 or later.

  • Property mode set to 100644
File size: 15.8 KB
Line 
1dnl aclocal.m4 generated automatically by aclocal 1.4
2
3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13dnl $Id$
14
15AC_DEFUN(RTEMS_PATH_PERL,
16[
17AC_PATH_PROG(PERL,perl)
18if test -z "$PERL" ; then
19AC_MSG_WARN(
20[***]
21[   perl was not found]
22[   Note: Some tools will not be built.])
23fi
24])
25
26dnl
27dnl $Id$
28dnl
29
30dnl macro to detect mkdir
31AC_DEFUN(RTEMS_PATH_MKDIR,
32[AC_PATH_PROG(MKDIR,mkdir)
33])
34
35dnl macro to check for mkdir -p
36AC_DEFUN(RTEMS_PROG_MKDIR_P,
37[
38AC_REQUIRE([RTEMS_PATH_MKDIR])
39AC_MSG_CHECKING([for working $MKDIR -p])
40AC_CACHE_VAL(rtems_cv_prog_mkdir_p,
41[rm -rf conftestdata
42if $MKDIR -p conftestdata 2>/dev/null ;then
43rtems_cv_prog_MKDIR_P="yes"
44else
45rtems_cv_prog_MKDIR_P="no"
46fi])dnl
47rm -rf conftestdata
48AC_MSG_RESULT($rtems_cv_prog_MKDIR_P)
49])
50
51dnl macro to check for mkdir -m 0755
52AC_DEFUN(RTEMS_PROG_MKDIR_M,
53[
54AC_REQUIRE([RTEMS_PATH_MKDIR])
55AC_MSG_CHECKING([for working $MKDIR -m 0755])
56AC_CACHE_VAL(rtems_cv_prog_MKDIR_P,
57[rm -rf conftestdata
58if $MKDIR -m 0775 conftestdata 2>/dev/null; then
59rtems_cv_prog_MKDIR_M="yes"
60else
61rtems_cv_prog_MKDIR_M="no"
62fi])dnl
63rm -rf conftestdata
64AC_MSG_RESULT($rtems_cv_prog_MKDIR_M)
65])
66
67
68dnl $Id$
69
70AC_DEFUN(RTEMS_PATH_KSH,
71[
72dnl NOTE: prefer bash over ksh over sh
73AC_PATH_PROGS(KSH,bash ksh sh)
74if test -z "$KSH"; then
75dnl NOTE: This cannot happen -- /bin/sh must always exist
76AC_MSG_ERROR(
77[***]
78[    Cannot determine a usable shell bash/ksh/sh]
79[    Please contact your system administrator] );
80fi
81])
82
83dnl
84dnl $Id$
85dnl
86
87dnl canonicalize target cpu
88dnl NOTE: Most rtems targets do not fullfil autoconf's
89dnl target naming conventions "processor-vendor-os"
90dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
91dnl and we have to fix it for rtems ourselves
92
93AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
94[
95AC_REQUIRE([AC_CANONICAL_SYSTEM])
96AC_MSG_CHECKING(rtems target cpu)
97changequote(,)dnl
98case "${target}" in
99  # hpux unix port should go here
100  i[3456]86-go32-rtems*)
101        target_cpu=i386
102        ;;
103  i[3456]86-pc-linux*)          # unix "simulator" port
104        target_cpu=unix
105        ;;
106  i[3456]86-*freebsd2*)         # unix "simulator" port
107        target_cpu=unix
108        ;;
109  no_cpu-*rtems*)
110        target_cpu=no_cpu
111        ;;
112  ppc*-*rtems*)
113        target_cpu=powerpc
114        ;;
115  sparc-sun-solaris*)           # unix "simulator" port
116        target_cpu=unix
117        ;;
118  *)
119        target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
120        ;;
121esac
122changequote([,])dnl
123AC_MSG_RESULT($target_cpu)
124])
125
126dnl
127dnl  $Id$
128dnl
129dnl Set program_prefix
130dnl
131dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
132dnl                             Extracted from configure
133
134AC_DEFUN(RTEMS_TOOL_PREFIX,
135[AC_REQUIRE([AC_CANONICAL_TARGET])dnl
136AC_REQUIRE([AC_CANONICAL_BUILD])dnl
137
138if [[ "${program_prefix}" = "NONE" ]] ; then
139  if [[ "${target}" = "${host}" ]] ; then
140    program_prefix=
141  else
142    program_prefix=${target}-
143  fi
144fi
145])
146
147dnl
148dnl $Id$
149dnl
150dnl Check for target gcc
151dnl
152dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
153dnl                             Completely reworked
154
155AC_DEFUN(RTEMS_PROG_CC,
156[
157AC_BEFORE([$0], [AC_PROG_CPP])dnl
158AC_BEFORE([$0], [AC_PROG_CC])dnl
159AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
160
161dnl Only accept gcc and cc
162dnl NOTE: This might be too restrictive for native compilation
163AC_PATH_PROGS(CC_FOR_TARGET, "$program_prefix"gcc "$program_prefix"cc )
164test -z "$CC_FOR_TARGET" \
165  && AC_MSG_ERROR([no acceptable cc found in \$PATH])
166
167dnl backup
168rtems_save_CC=$CC
169rtems_save_CFLAGS=$CFLAGS
170
171dnl temporarily set CC
172CC=$CC_FOR_TARGET
173
174AC_PROG_CC_WORKS
175AC_PROG_CC_GNU
176
177if test $ac_cv_prog_gcc = yes; then
178  GCC=yes
179dnl Check whether -g works, even if CFLAGS is set, in case the package
180dnl plays around with CFLAGS (such as to build both debugging and
181dnl normal versions of a library), tasteless as that idea is.
182  ac_test_CFLAGS="${CFLAGS+set}"
183  ac_save_CFLAGS="$CFLAGS"
184  CFLAGS=
185  AC_PROG_CC_G
186  if test "$ac_test_CFLAGS" = set; then
187    CFLAGS="$ac_save_CFLAGS"
188  elif test $ac_cv_prog_cc_g = yes; then
189    CFLAGS="-g -O2"
190  else
191    CFLAGS="-O2"
192  fi
193else
194  GCC=
195  test "${CFLAGS+set}" = set || CFLAGS="-g"
196fi
197
198rtems_cv_prog_gcc=$ac_cv_prog_gcc
199rtems_cv_prog_cc_g=$ac_cv_prog_cc_g
200rtems_cv_prog_cc_works=$ac_cv_prog_cc_works
201rtems_cv_prog_cc_cross=$ac_cv_prog_cc_cross
202
203dnl restore initial values
204CC=$rtems_save_CC
205CFLAGS=$rtems_save_CFLAGS
206
207unset ac_cv_prog_gcc
208unset ac_cv_prog_cc_g
209unset ac_cv_prog_cc_works
210unset ac_cv_prog_cc_cross
211])
212
213dnl
214dnl $Id$
215dnl
216dnl Check whether the target compiler accepts -specs
217dnl
218dnl 98/02/11 Ralf Corsepius     corsepiu@faw.uni-ulm.de
219dnl
220
221AC_DEFUN(RTEMS_GCC_SPECS,
222[AC_REQUIRE([RTEMS_PROG_CC])
223AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts -specs,rtems_cv_gcc_specs,
224[
225rtems_cv_gcc_specs=no
226if test "$rtems_cv_prog_gcc" = "yes"; then
227  touch confspec
228  echo 'void f(){}' >conftest.c
229  if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
230    rtems_cv_gcc_specs=yes
231  fi
232fi
233rm -f confspec conftest*
234])])
235
236dnl
237dnl $Id$
238dnl
239dnl Check whether the target compiler accepts -pipe
240dnl
241dnl 98/02/11 Ralf Corsepius     corsepiu@faw.uni-ulm.de
242dnl
243
244AC_DEFUN(RTEMS_GCC_PIPE,
245[AC_REQUIRE([RTEMS_PROG_CC])
246AC_REQUIRE([AC_CANONICAL_HOST])
247AC_CACHE_CHECK(whether $CC_FOR_TARGET accepts --pipe,rtems_cv_gcc_pipe,
248[
249rtems_cv_gcc_pipe=no
250if test "$rtems_cv_prog_gcc" = "yes"; then
251case "$host_os" in
252  cygwin32*)
253    ;;
254  *)
255    echo 'void f(){}' >conftest.c
256    if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
257      rtems_cv_gcc_pipe=yes
258    fi
259    rm -f conftest*
260    ;;
261esac
262fi
263])
264])
265
266dnl
267dnl $Id$
268dnl
269dnl Check for target g++
270dnl
271dnl 98/05/20 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
272dnl                             Completely reworked
273
274AC_DEFUN(RTEMS_PROG_CXX,
275[
276AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
277AC_BEFORE([$0], [AC_PROG_CXX])dnl
278AC_REQUIRE([RTEMS_TOOL_PREFIX])dnl
279
280dnl Only accept g++ and c++
281dnl NOTE: This might be too restrictive for native compilation
282AC_PATH_PROGS(CXX_FOR_TARGET, "$program_prefix"g++ "$program_prefix"c++)
283test -z "$CXX_FOR_TARGET" \
284  && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
285
286dnl backup
287rtems_save_CXX=$CXX
288rtems_save_CXXFLAGS=$CXXFLAGS
289
290dnl temporarily set CXX
291CXX=$CXX_FOR_TARGET
292
293AC_PROG_CXX_WORKS
294AC_PROG_CXX_GNU
295
296if test $ac_cv_prog_gxx = yes; then
297  GXX=yes
298dnl Check whether -g works, even if CXXFLAGS is set, in case the package
299dnl plays around with CXXFLAGS (such as to build both debugging and
300dnl normal versions of a library), tasteless as that idea is.
301  ac_test_CXXFLAGS="${CXXFLAGS+set}"
302  ac_save_CXXFLAGS="$CXXFLAGS"
303  CXXFLAGS=
304  AC_PROG_CXX_G
305  if test "$ac_test_CXXFLAGS" = set; then
306    CXXFLAGS="$ac_save_CXXFLAGS"
307  elif test $ac_cv_prog_cxx_g = yes; then
308    CXXFLAGS="-g -O2"
309  else
310    CXXFLAGS="-O2"
311  fi
312else
313  GXX=
314  test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
315fi
316
317rtems_cv_prog_gxx=$ac_cv_prog_gxx
318rtems_cv_prog_cxx_g=$ac_cv_prog_cxx_g
319rtems_cv_prog_cxx_works=$ac_cv_prog_cxx_works
320rtems_cv_prog_cxx_cross=$ac_cv_prog_cxx_cross
321
322CXX=$rtems_save_CXX
323CXXFLAGS=$rtems_save_CXXFLAGS
324
325dnl restore initial values
326unset ac_cv_prog_gxx
327unset ac_cv_prog_cc_g
328unset ac_cv_prog_cxx_works
329unset ac_cv_prog_cxx_cross
330])
331
332dnl
333dnl $Id$
334dnl
335dnl Set target tools
336dnl
337dnl 98/06/23 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
338dnl             fixing cache/environment variable handling
339dnl             adding checks for cygwin/egcs '\\'-bug
340dnl             adding checks for ranlib/ar -s problem
341dnl
342dnl 98/02/12 Ralf Corsepius     (corsepiu@faw.uni-ulm.de)
343dnl
344
345AC_DEFUN(RTEMS_GCC_PRINT,
346[ case $host_os in
347  *cygwin32*)
348    dnl FIXME: Hack for cygwin/egcs reporting mixed '\\' and '/'
349    dnl        Should be removed once cygwin/egcs reports '/' only
350    $1=`$CC_FOR_TARGET --print-prog-name=$2 | sed -e 's%\\\\%/%g' `
351    ;;
352  *)
353    $1=`$CC_FOR_TARGET --print-prog-name=$2`
354    ;;
355  esac
356])
357
358AC_DEFUN(RTEMS_PATH_TOOL,
359[
360AC_MSG_CHECKING([target's $2])
361AC_CACHE_VAL(ac_cv_path_$1,:)
362AC_MSG_RESULT([$ac_cv_path_$1])
363
364if test -n "$ac_cv_path_$1"; then
365  dnl retrieve the value from the cache
366  $1=$ac_cv_path_$1
367else
368  dnl the cache was not set
369  if test -z "[$]$1" ; then
370    if test "$rtems_cv_prog_gcc" = "yes"; then
371      # We are using gcc, ask it about its tool
372      # NOTE: Necessary if gcc was configured to use the target's
373      # native tools or uses prefixes for gnutools (e.g. gas instead of as)
374      RTEMS_GCC_PRINT($1,$2)
375    fi
376  else
377    # The user set an environment variable.
378    # Check whether it is an absolute path, otherwise AC_PATH_PROG
379    # will override the environment variable, which isn't what the user
380    # intends
381    AC_MSG_CHECKING([whether environment variable $1 is an absolute path])
382    case "[$]$1" in
383    /*) # valid
384      AC_MSG_RESULT("yes")
385    ;;
386    *)  # invalid for AC_PATH_PROG
387      AC_MSG_RESULT("no")
388      AC_MSG_ERROR([***]
389        [Environment variable $1 should either]
390        [be unset (preferred) or contain an absolute path])
391    ;;
392    esac
393  fi
394
395  AC_PATH_PROG($1,"$program_prefix"$2,$3)
396fi
397])
398
399AC_DEFUN(RTEMS_CANONICALIZE_TOOLS,
400[AC_REQUIRE([RTEMS_PROG_CC])dnl
401
402dnl FIXME: What shall be done if these tools are not available?
403  RTEMS_PATH_TOOL(AR_FOR_TARGET,ar,no)
404  RTEMS_PATH_TOOL(AS_FOR_TARGET,as,no)
405  RTEMS_PATH_TOOL(LD_FOR_TARGET,ld,no)
406  RTEMS_PATH_TOOL(NM_FOR_TARGET,nm,no)
407
408dnl special treatment of ranlib
409  RTEMS_PATH_TOOL(RANLIB_FOR_TARGET,ranlib,no)
410  if test "$RANLIB_FOR_TARGET" = "no"; then
411    # ranlib wasn't found; check if ar -s is available
412    RTEMS_AR_FOR_TARGET_S
413    if test $rtems_cv_AR_FOR_TARGET_S = "yes" ; then
414      dnl override RANLIB_FOR_TARGET's cache
415      ac_cv_path_RANLIB_FOR_TARGET="$AR_FOR_TARGET -s"
416      RANLIB_FOR_TARGET=$ac_cv_path_RANLIB_FOR_TARGET
417    else
418      AC_MSG_ERROR([***]
419        [Can't figure out how to build a library index]
420        [Neither ranlib nor ar -s seem to be available] )
421    fi
422  fi
423
424dnl NOTE: These may not be available if not using gnutools
425  RTEMS_PATH_TOOL(OBJCOPY_FOR_TARGET,objcopy,no)
426  RTEMS_PATH_TOOL(SIZE_FOR_TARGET,size,no)
427  RTEMS_PATH_TOOL(STRIP_FOR_TARGET,strip,no)
428])
429
430dnl
431dnl $Id$
432dnl
433
434AC_DEFUN(RTEMS_AR_FOR_TARGET_S,
435[
436AC_CACHE_CHECK(whether $AR_FOR_TARGET -s works,
437rtems_cv_AR_FOR_TARGET_S,
438[
439cat > conftest.$ac_ext <<EOF
440int foo( int b )
441{ return b; }
442EOF
443if AC_TRY_COMMAND($CC_FOR_TARGET -o conftest.o -c conftest.$ac_ext) \
444  && AC_TRY_COMMAND($AR_FOR_TARGET -sr conftest.a conftest.o) \
445  && test -s conftest.a ; \
446then
447  rtems_cv_AR_FOR_TARGET_S="yes"
448else
449  rtems_cv_AR_FOR_TARGET_S="no"
450fi
451  rm -f conftest*
452])
453])
454
455
456dnl
457dnl  $Id$
458dnl
459
460dnl check for i386 gas supporting 16 bit mode
461dnl     - binutils 2.9.1.0.7 and higher
462
463AC_DEFUN(RTEMS_I386_GAS_CODE16,
464  if test "${target_cpu}" = "i386"; then
465    AC_CACHE_CHECK([for 16 bit mode assembler support],
466      rtems_cv_prog_gas_code16,
467      [cat > conftest.s << EOF
468         .code16
469         data32
470         addr32
471         lgdt 0
472EOF
473      if AC_TRY_COMMAND($AS_FOR_TARGET -o conftest.o conftest.s); then
474        rtems_cv_prog_gas_code16=yes
475      else
476        rtems_cv_prog_gas_code16=no
477      fi])
478    RTEMS_GAS_CODE16="$rtems_cv_prog_gas_code16"
479  fi
480)
481
482
483dnl
484dnl  $Id$
485dnl
486dnl Detect the Cygwin32 environment (unix under Win32)
487dnl
488dnl 98/06/16 David Fiddes       (D.J.Fiddes@hw.ac.uk)
489dnl                             Hacked from automake-1.3
490
491# Check to see if we're running under Cygwin32, without using
492# AC_CANONICAL_*.  If so, set output variable CYGWIN32 to "yes".
493# Otherwise set it to "no".
494
495dnl RTEMS_CYGWIN32()
496AC_DEFUN(RTEMS_CYGWIN32,
497[AC_CACHE_CHECK(for Cygwin32 environment, rtems_cv_cygwin32,
498[AC_TRY_COMPILE(,[return __CYGWIN32__;],
499rtems_cv_cygwin32=yes, rtems_cv_cygwin32=no)
500rm -f conftest*])
501CYGWIN32=
502test "$rtems_cv_cygwin32" = yes && CYGWIN32=yes])
503
504
505dnl
506dnl  $Id$
507dnl
508dnl Set the EXE extension
509dnl
510dnl 98/06/16 David Fiddes       (D.J.Fiddes@hw.ac.uk)
511dnl                             Hacked from automake-1.3
512
513# Check to see if we're running under Win32, without using
514# AC_CANONICAL_*.  If so, set output variable EXEEXT to ".exe".
515# Otherwise set it to "".
516
517dnl RTEMS_EXEEXT()
518dnl This knows we add .exe if we're building in the Cygwin32
519dnl environment. But if we're not, then it compiles a test program
520dnl to see if there is a suffix for executables.
521AC_DEFUN(RTEMS_EXEEXT,
522[AC_REQUIRE([RTEMS_CYGWIN32])
523AC_MSG_CHECKING([for executable suffix])
524AC_CACHE_VAL(rtems_cv_exeext,
525[if test "$CYGWIN32" = yes; then
526rtems_cv_exeext=.exe
527else
528cat > rtems_c_test.c << 'EOF'
529int main() {
530/* Nothing needed here */
531}
532EOF
533${CC-cc} -o rtems_c_test $CFLAGS $CPPFLAGS $LDFLAGS rtems_c_test.c $LIBS 1>&5
534rtems_cv_exeext=`echo rtems_c_test.* | grep -v rtems_c_test.c | sed -e s/rtems_c_test//`
535rm -f rtems_c_test*])
536test x"${rtems_cv_exeext}" = x && rtems_cv_exeext=no
537fi
538EXEEXT=""
539test x"${rtems_cv_exeext}" != xno && EXEEXT=${rtems_cv_exeext}
540AC_MSG_RESULT(${rtems_cv_exeext})
541AC_SUBST(EXEEXT)])
542
543
544dnl
545dnl $Id$
546dnl
547dnl Check for System V IPC calls used by Unix simulators
548dnl
549dnl 98/07/17 Dario Alcocer     alcocer@netcom.com
550dnl          Ralf Corsepius    corsepiu@faw.uni-ulm.de
551dnl
552dnl Note: $host_os should probably *not* ever be used here to
553dnl determine if host supports System V IPC calls, since some
554dnl (e.g. FreeBSD 2.x) are configured by default to include only
555dnl a subset of the System V IPC calls.  Therefore, to make sure
556dnl all of the required calls are found, test for each call explicitly.
557dnl
558dnl All of the calls use IPC_PRIVATE, so tests will not unintentionally
559dnl modify any existing key sets.  See the man pages for semget, shmget,
560dnl msgget, semctl, shmctl and msgctl for details.
561
562AC_DEFUN(RTEMS_SYSV_SEM,
563[AC_REQUIRE([RTEMS_PROG_CC])
564AC_REQUIRE([AC_CANONICAL_HOST])
565AC_CACHE_CHECK(whether $RTEMS_HOST supports System V semaphores,
566rtems_cv_sysv_sem,
567[
568AC_TRY_RUN([
569#include <sys/types.h>
570#include <sys/ipc.h>
571#include <sys/sem.h>
572int main () {
573#if !defined(sun)
574  union semun arg ;
575#else
576  union semun {
577    int val;
578    struct semid_ds *buf;
579    ushort *array;
580  } arg;
581#endif
582  int id=semget(IPC_PRIVATE,1,IPC_CREAT|0400);
583  if (id == -1)
584    exit(1);
585  arg.val = 0; /* avoid implicit type cast to union */
586  if (semctl(id, 0, IPC_RMID, arg) == -1)
587    exit(1);
588  exit(0);
589}
590],
591rtems_cv_sysv_sem="yes", rtems_cv_sysv_sem="no", :)
592])
593])
594
595AC_DEFUN(RTEMS_SYSV_SHM,
596[AC_REQUIRE([RTEMS_PROG_CC])
597AC_REQUIRE([AC_CANONICAL_HOST])
598AC_CACHE_CHECK(whether $RTEMS_HOST supports System V shared memory,
599rtems_cv_sysv_shm,
600[
601AC_TRY_RUN([
602#include <sys/types.h>
603#include <sys/ipc.h>
604#include <sys/shm.h>
605int main () {
606  int id=shmget(IPC_PRIVATE,1,IPC_CREAT|0400);
607  if (id == -1)
608    exit(1);
609  if (shmctl(id, IPC_RMID, 0) == -1)
610    exit(1);
611  exit(0);
612}
613],
614rtems_cv_sysv_shm="yes", rtems_cv_sysv_shm="no", :)
615])
616])
617
618AC_DEFUN(RTEMS_SYSV_MSG,
619[AC_REQUIRE([RTEMS_PROG_CC])
620AC_REQUIRE([AC_CANONICAL_HOST])
621AC_CACHE_CHECK(whether $RTEMS_HOST supports System V messages,
622rtems_cv_sysv_msg,
623[
624AC_TRY_RUN([
625#include <sys/types.h>
626#include <sys/ipc.h>
627#include <sys/msg.h>
628int main () {
629  int id=msgget(IPC_PRIVATE,IPC_CREAT|0400);
630  if (id == -1)
631    exit(1);
632  if (msgctl(id, IPC_RMID, 0) == -1)
633    exit(1);
634  exit(0);
635}
636],
637rtems_cv_sysv_msg="yes", rtems_cv_sysv_msg="no", :)
638])
639])
640
641dnl
642dnl $Id$
643dnl
644
645dnl RTEMS_CHECK_MAKEFILE(path)
646dnl Search for Makefile.in's within the directory starting
647dnl at path and append an entry for Makefile to global variable
648dnl "makefiles" (from configure.in) for each Makefile.in found
649dnl
650AC_DEFUN(RTEMS_CHECK_MAKEFILE,
651[RTEMS_CHECK_FILES_IN($1,Makefile,makefiles)
652])
653
654dnl
655dnl $Id$
656dnl
657
658dnl RTEMS_CHECK_FILES_IN(path,file,var)
659dnl path .. path relative to srcdir, where to start searching for files
660dnl file .. name of the files to search for
661dnl var  .. shell variable to append files found
662
663AC_DEFUN(RTEMS_CHECK_FILES_IN,
664[
665AC_MSG_CHECKING(for $2.in in $1)
666if test -d $srcdir/$1; then
667  rtems_av_save_dir=`pwd`;
668  cd $srcdir;
669  rtems_av_tmp=`find $1 -name "$2.in" -print | sed "s/$2\.in/%/" | sort | sed "s/%/$2/"`
670  $3="$$3 $rtems_av_tmp";
671  cd $rtems_av_save_dir;
672  AC_MSG_RESULT(done)
673else
674  AC_MSG_RESULT(no)
675fi
676])
677
678
Note: See TracBrowser for help on using the repository browser.