summaryrefslogtreecommitdiffstats
path: root/c/src/libmisc
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2002-11-14 12:13:26 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2002-11-14 12:13:26 +0000
commit22b689b274c0d2ac2369e7969055dede3e0907cf (patch)
treea24b9226247ce73f5fa23ab3c4729ce7854dc108 /c/src/libmisc
parent6a31b7c044a2edcc0ca96614756f31dce1be3cc9 (diff)
downloadrtems-22b689b274c0d2ac2369e7969055dede3e0907cf.tar.bz2
2002-11-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* capture/Makefile.am: Remove AUTOMAKE_OPTIONS. * serdbg/Makefile.am: Remove AUTOMAKE_OPTIONS. * serdbg/serdbgio.c: Add #include <unistd.h>. * shell/Makefile.am: Add RTEMS_LIBSHELL conditional. * wrapup/Makefile.am: Add RTEMS_LIBSHELL conditional. * configure.ac: Check for stdio assignments. Add RTEMS_LIBSHELL conditional.
Diffstat (limited to 'c/src/libmisc')
-rw-r--r--c/src/libmisc/ChangeLog10
-rw-r--r--c/src/libmisc/capture/Makefile.am2
-rw-r--r--c/src/libmisc/configure.ac12
-rw-r--r--c/src/libmisc/serdbg/Makefile.am2
-rw-r--r--c/src/libmisc/serdbg/serdbgio.c1
-rw-r--r--c/src/libmisc/shell/Makefile.am6
-rw-r--r--c/src/libmisc/wrapup/Makefile.am8
7 files changed, 34 insertions, 7 deletions
diff --git a/c/src/libmisc/ChangeLog b/c/src/libmisc/ChangeLog
index b453645884..b3341351fa 100644
--- a/c/src/libmisc/ChangeLog
+++ b/c/src/libmisc/ChangeLog
@@ -1,3 +1,13 @@
+2002-11-14 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * capture/Makefile.am: Remove AUTOMAKE_OPTIONS.
+ * serdbg/Makefile.am: Remove AUTOMAKE_OPTIONS.
+ * serdbg/serdbgio.c: Add #include <unistd.h>.
+ * shell/Makefile.am: Add RTEMS_LIBSHELL conditional.
+ * wrapup/Makefile.am: Add RTEMS_LIBSHELL conditional.
+ * configure.ac: Check for stdio assignments.
+ Add RTEMS_LIBSHELL conditional.
+
2002-11-01 Joel Sherrill <joel@OARcorp.com>
* stackchk/check.c: Removed warnings.
diff --git a/c/src/libmisc/capture/Makefile.am b/c/src/libmisc/capture/Makefile.am
index 2cac13e310..cc26dcbdb3 100644
--- a/c/src/libmisc/capture/Makefile.am
+++ b/c/src/libmisc/capture/Makefile.am
@@ -2,8 +2,6 @@
## $Id$
##
-AUTOMAKE_OPTIONS = foreign 1.4
-
include_rtemsdir = $(includedir)/rtems
LIBNAME = libcapture-tmp
diff --git a/c/src/libmisc/configure.ac b/c/src/libmisc/configure.ac
index 141242d756..3907b776cd 100644
--- a/c/src/libmisc/configure.ac
+++ b/c/src/libmisc/configure.ac
@@ -29,6 +29,18 @@ RTEMS_CHECK_MULTIPROCESSING(RTEMS_BSP)
AM_CONDITIONAL(HAS_MP,test "$HAS_MP" = "yes")
+# shell/* wants to assign file descriptors to stdio file descriptors.
+AC_MSG_CHECKING([for assignable stdio])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [#include <stdio.h>],
+ [stdin = fopen("/tmp", "r")])],
+ [HAVE_ASSIGNABLE_STDIO=yes],
+ [HAVE_ASSIGNABLE_STDIO=no])
+AC_MSG_RESULT([$HAVE_ASSIGNABLE_STDIO])
+
+AM_CONDITIONAL([RTEMS_LIBSHELL],[test x"$HAVE_ASSIGNABLE_STDIO" = x"yes"])
+
# Explicitly list all Makefiles here
AC_CONFIG_FILES([Makefile
cpuuse/Makefile
diff --git a/c/src/libmisc/serdbg/Makefile.am b/c/src/libmisc/serdbg/Makefile.am
index 44d374bbc9..7b070880bf 100644
--- a/c/src/libmisc/serdbg/Makefile.am
+++ b/c/src/libmisc/serdbg/Makefile.am
@@ -2,8 +2,6 @@
## $Id$
##
-AUTOMAKE_OPTIONS = foreign 1.4
-
include_rtemsdir = $(includedir)/rtems
LIBNAME = libserdbg-tmp
diff --git a/c/src/libmisc/serdbg/serdbgio.c b/c/src/libmisc/serdbg/serdbgio.c
index d44fa7f9fa..57a10d8e20 100644
--- a/c/src/libmisc/serdbg/serdbgio.c
+++ b/c/src/libmisc/serdbg/serdbgio.c
@@ -28,6 +28,7 @@
#include <rtems.h>
#include <rtems/libio_.h>
#include <errno.h>
+#include <unistd.h> /* close */
#include <stdio.h>
#include <fcntl.h>
#include <termios.h>
diff --git a/c/src/libmisc/shell/Makefile.am b/c/src/libmisc/shell/Makefile.am
index 212f3d7542..d8f5daa707 100644
--- a/c/src/libmisc/shell/Makefile.am
+++ b/c/src/libmisc/shell/Makefile.am
@@ -11,7 +11,9 @@ LIB = $(ARCH)/$(LIBNAME).a
C_FILES = cmds.c shell.c
C_O_FILES = $(C_FILES:%.c=$(ARCH)/%.$(OBJEXT))
+if RTEMS_LIBSHELL
include_rtems_HEADERS = shell.h
+endif
OBJS = $(C_O_FILES)
@@ -34,10 +36,12 @@ $(LIB): $(OBJS)
PREINSTALL_FILES = $(PROJECT_INCLUDE)/rtems \
$(include_rtems_HEADERS:%=$(PROJECT_INCLUDE)/rtems/%)
+if RTEMS_LIBSHELL
all-local: $(ARCH) $(PREINSTALL_FILES) $(OBJS) $(LIB)
+endif
.PRECIOUS: $(LIB)
-EXTRA_DIST = README shell.c cmds.c
+EXTRA_DIST = README shell.c cmds.c shell.h
include $(top_srcdir)/../../../automake/local.am
diff --git a/c/src/libmisc/wrapup/Makefile.am b/c/src/libmisc/wrapup/Makefile.am
index 834c1710a0..d4ee95b72b 100644
--- a/c/src/libmisc/wrapup/Makefile.am
+++ b/c/src/libmisc/wrapup/Makefile.am
@@ -11,11 +11,15 @@ include $(top_srcdir)/../../../automake/lib.am
## XXX temporarily remove this from the list because it causes a
## XXX number of BSPs to not link "main(){}" used by autoconf
## ../serdbg/$(ARCH)/libserdbg-tmp.a
-
+
+if RTEMS_LIBSHELL
+RTEMS_LIBSHELL = ../shell/$(ARCH)/libshell-tmp.a
+endif
+
TMP_LIBS = ../monitor/$(ARCH)/libmonitor-tmp.a \
../untar/$(ARCH)/libuntar-tmp.a ../stackchk/$(ARCH)/libstackchk-tmp.a \
../cpuuse/$(ARCH)/libcpuuse-tmp.a ../rtmonuse/$(ARCH)/librtmonuse-tmp.a \
- ../shell/$(ARCH)/libshell-tmp.a ../dumpbuf/$(ARCH)/libdumpbuf-tmp.a \
+ $(RTEMS_LIBSHELL) ../dumpbuf/$(ARCH)/libdumpbuf-tmp.a \
../devnull/$(ARCH)/libdevnull-tmp.a ../dummy/$(ARCH)/libdummy-tmp.a \
../mw-fb/$(ARCH)/libmw-fb-tmp.a ../capture/$(ARCH)/libcapture-tmp.a