AC-Archive
Autoconf Macro Archive

ac-archive.sf.net: - Project CVS - Download
Macro Index
- AM Support
- C++ Support
- C Support
- Fortran Support
- Java Support
- Cross Compilation
- Installed Packages
- Miscellaneous
- LaTeX Support
- Uncategorized
- archive macros
- adl's macros
- bkorb's macros
- guidod's macros
- latex's macros
- other's macros
- rleigh's macros
- obsoleted macros
- released macros
- search index

Documentation
- Contribute!
- History
- acincludedir m4
- acinclude (tool)
- macro howto
- ax tricks
- maintainers
- License
- Topics

generated...
2007-08-05

(C) 2007 guidod
Download the M4 Source.

etr_struct_semun

Back to the Main Page.

Synopsis
ETR_STRUCT_SEMUN
, 
Version

2001-05-28

Author

Warren Young <warren@etr-usa.com>

License

AllPermissive
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. Users of this software should generally follow the principles of the MIT License includings its disclaimer.

Category

cryp.to ac-archive's Miscellaneous (released)

Documentation

This macro checks to see if sys/sem.h defines struct semun. Some systems do, some systems don't. Your code must be able to deal with this possibility; if HAVE_STRUCT_SEMUM isn't defined for a given system, you have to define this structure before you can call functions like semctl().

You should call ETR_SYSV_IPC before this macro, to separate the check for System V IPC headers from the check for struct semun.

M4 Source Code
AC_DEFUN([ETR_STRUCT_SEMUN],
[
AC_CACHE_CHECK([for struct semun], ac_cv_struct_semun, [
        AC_TRY_COMPILE(
                [
                        #include &lt;sys/types.h&gt;
                        #include &lt;sys/ipc.h&gt;
                        #include &lt;sys/sem.h&gt;
                ],
                [ struct semun s; ],
                ac_cv_struct_semun=yes,
                ac_cv_struct_semun=no)
])

        if test x"$ac_cv_struct_semun" = "xyes"
        then
                AC_DEFINE(HAVE_STRUCT_SEMUN, 1,
                        [ Define if your system's sys/sem.h file defines struct semun ])
        fi
]) dnl ETR_STRUCT_SEMUN