source: rtems/aclocal/sysv-ipc.m4 @ 06fa582

4.104.114.84.95
Last change on this file since 06fa582 was 06fa582, checked in by Joel Sherrill <joel.sherrill@…>, on 08/19/98 at 12:56:20

Patches from Ralf Corsepius <corsepiu@…> and myself to
make solaris target buildable.

  1. The ipc check fails since solaris does not define union semun.

The unix port code actually defines this type itself on solaris. Doing
the same thing lets it get configured. Then...

  1. It looks like BSDINSTALL is not defined properly.

BSDINSTALL is defined in make/host.cfg.in as
BSDINSTALL=@INSTALL@

@INSTALL@ is generated by autoconf's standard macro AC_PROG_INSTALL, which
is widely used in almost any autoconf/automake configured package. In case
there is really something wrong with it, then it must be considered a bug
in autoconf.

I can see a doubious fragment in AC_PROG_INSTALL, which is used when no
appropriate bsd-install is found.

Finally Ralf saw a problem with the find on solaris which I also saw and
fixed.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1dnl
2dnl $Id$
3dnl
4dnl Check for System V IPC calls used by Unix simulators
5dnl
6dnl 98/07/17 Dario Alcocer     alcocer@netcom.com
7dnl          Ralf Corsepius    corsepiu@faw.uni-ulm.de
8dnl
9dnl Note: $host_os should probably *not* ever be used here to
10dnl determine if host supports System V IPC calls, since some
11dnl (e.g. FreeBSD 2.x) are configured by default to include only
12dnl a subset of the System V IPC calls.  Therefore, to make sure
13dnl all of the required calls are found, test for each call explicitly.
14dnl
15dnl All of the calls use IPC_PRIVATE, so tests will not unintentionally
16dnl modify any existing key sets.  See the man pages for semget, shmget,
17dnl msgget, semctl, shmctl and msgctl for details.
18
19AC_DEFUN(RTEMS_SYSV_SEM,
20[AC_REQUIRE([RTEMS_PROG_CC])
21AC_REQUIRE([AC_CANONICAL_HOST])
22AC_CACHE_CHECK(whether $RTEMS_HOST supports System V semaphores,
23rtems_cv_sysv_sem,
24[
25AC_TRY_RUN([
26#include <sys/types.h>
27#include <sys/ipc.h>
28#include <sys/sem.h>
29int main () {
30#if !defined(sun)
31  union semun arg ;
32#else
33  union semun {
34    int val;
35    struct semid_ds *buf;
36    ushort *array;
37  } arg;
38#endif
39  int id=semget(IPC_PRIVATE,1,IPC_CREAT|0400);
40  if (id == -1)
41    exit(1);
42  arg.val = 0; /* avoid implicit type cast to union */
43  if (semctl(id, 0, IPC_RMID, arg) == -1)
44    exit(1);
45  exit(0);
46}
47],
48rtems_cv_sysv_sem="yes", rtems_cv_sysv_sem="no", :)
49])
50])
51
52AC_DEFUN(RTEMS_SYSV_SHM,
53[AC_REQUIRE([RTEMS_PROG_CC])
54AC_REQUIRE([AC_CANONICAL_HOST])
55AC_CACHE_CHECK(whether $RTEMS_HOST supports System V shared memory,
56rtems_cv_sysv_shm,
57[
58AC_TRY_RUN([
59#include <sys/types.h>
60#include <sys/ipc.h>
61#include <sys/shm.h>
62int main () {
63  int id=shmget(IPC_PRIVATE,1,IPC_CREAT|0400);
64  if (id == -1)
65    exit(1);
66  if (shmctl(id, IPC_RMID, 0) == -1)
67    exit(1);
68  exit(0);
69}
70],
71rtems_cv_sysv_shm="yes", rtems_cv_sysv_shm="no", :)
72])
73])
74
75AC_DEFUN(RTEMS_SYSV_MSG,
76[AC_REQUIRE([RTEMS_PROG_CC])
77AC_REQUIRE([AC_CANONICAL_HOST])
78AC_CACHE_CHECK(whether $RTEMS_HOST supports System V messages,
79rtems_cv_sysv_msg,
80[
81AC_TRY_RUN([
82#include <sys/types.h>
83#include <sys/ipc.h>
84#include <sys/msg.h>
85int main () {
86  int id=msgget(IPC_PRIVATE,IPC_CREAT|0400);
87  if (id == -1)
88    exit(1);
89  if (msgctl(id, IPC_RMID, 0) == -1)
90    exit(1);
91  exit(0);
92}
93],
94rtems_cv_sysv_msg="yes", rtems_cv_sysv_msg="no", :)
95])
96])
Note: See TracBrowser for help on using the repository browser.