summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/configure.ac3
-rw-r--r--cpukit/posix/Makefile.am2
-rw-r--r--cpukit/posix/preinstall.am3
3 files changed, 7 insertions, 1 deletions
diff --git a/cpukit/configure.ac b/cpukit/configure.ac
index 2b16964ac1..00580824a0 100644
--- a/cpukit/configure.ac
+++ b/cpukit/configure.ac
@@ -136,6 +136,9 @@ AC_CHECK_HEADERS([tar.h errno.h sched.h sys/cdefs.h sys/queue.h],,
AS_IF([test -n "$rtems_missing_header"],
AC_MSG_ERROR([Missing required header $rtems_missing_header])])
+AC_CHECK_HEADERS([semaphore.h])
+AM_CONDITIONAL([HAVE_SEMAPHORE_H],[test x"$ac_cv_header_semaphore_h" = x"yes"])
+
## error out if libc doesn't provide stdint.h
AS_IF([test x"${ac_cv_header_stdint_h}" != xyes],
[AC_MSG_ERROR([Required header stdint.h not found])])
diff --git a/cpukit/posix/Makefile.am b/cpukit/posix/Makefile.am
index 9d6fd48f59..8ffd4e63c4 100644
--- a/cpukit/posix/Makefile.am
+++ b/cpukit/posix/Makefile.am
@@ -25,7 +25,9 @@ if HAS_PTHREADS
# include
include_HEADERS = include/aio.h
include_HEADERS += include/mqueue.h
+if !HAVE_SEMAPHORE_H
include_HEADERS += include/semaphore.h
+endif
# include/rtems/posix
include_rtems_posix_HEADERS += include/rtems/posix/aio_misc.h
diff --git a/cpukit/posix/preinstall.am b/cpukit/posix/preinstall.am
index 6e3f2a28ec..64a8c6bb1d 100644
--- a/cpukit/posix/preinstall.am
+++ b/cpukit/posix/preinstall.am
@@ -52,10 +52,11 @@ $(PROJECT_INCLUDE)/mqueue.h: include/mqueue.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/mqueue.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/mqueue.h
+if !HAVE_SEMAPHORE_H
$(PROJECT_INCLUDE)/semaphore.h: include/semaphore.h $(PROJECT_INCLUDE)/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/semaphore.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/semaphore.h
-
+endif
$(PROJECT_INCLUDE)/rtems/posix/aio_misc.h: include/rtems/posix/aio_misc.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/aio_misc.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/aio_misc.h