]> granicus.if.org Git - strace/commitdiff
Remove parts of automake machinery which are not needed on Linux
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 25 Feb 2012 14:34:10 +0000 (15:34 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 25 Feb 2012 14:34:10 +0000 (15:34 +0100)
This change is a verbatim part of Dmitry's changes to remove support
for non-Linux architectures.

* Makefile.am: Don't install PORTING file. Install README-linux-ptrace file.
Set OS variable to linux unconditionally.
* configure.ac: Remove code to set opsys variable, and its usage.
Remove checks for headers which are never present on Linux.
* m4/stat.m4: Remove 'ifdef LINUX' check.
* m4/statfs.m4: Likewise.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Makefile.am
configure.ac
m4/stat.m4
m4/statfs.m4

index 97cd43b88d08e8100e7189846409310757927339..5ac0c9d6115b6702ec9eb71f0706f4876bd29462 100644 (file)
@@ -6,8 +6,7 @@ bin_PROGRAMS = strace
 man_MANS = strace.1
 bin_SCRIPTS = strace-graph
 
-# OS is `linux'
-OS             = @opsys@
+OS             = linux
 # ARCH is `i386', `m68k', `sparc', etc.
 ARCH           = @arch@
 
@@ -28,8 +27,8 @@ EXTRA_DIST = $(man_MANS) errnoent.sh signalent.sh syscallent.sh ioctlsort.c \
             debian/strace.docs debian/strace.examples debian/strace.install \
             debian/strace.manpages debian/strace-udeb.install \
             strace.spec \
-            strace-graph ChangeLog ChangeLog-CVS COPYRIGHT CREDITS PORTING \
-            README-linux \
+            strace-graph ChangeLog ChangeLog-CVS COPYRIGHT CREDITS \
+            README-linux README-linux-ptrace \
             linux/ioctlsort.c linux/ioctlent.sh \
             linux/ioctlent.h.in linux/errnoent.h linux/signalent.h \
             linux/syscall.h linux/dummy.h \
index 6eb9a03e61b95f63fd60588f4b7d565e9a2274f8..d1513ca8a467743b6465cf275224bd9df8c078dc 100644 (file)
@@ -8,40 +8,6 @@ AM_INIT_AUTOMAKE([foreign check-news dist-xz no-dist-gzip silent-rules])
 AM_MAINTAINER_MODE
 AC_CANONICAL_HOST
 
-AC_MSG_CHECKING([for supported operating system])
-case "$host_os" in
-*linux*)
-       opsys=linux
-       AC_DEFINE([LINUX], 1, [Define for the Linux operating system.])
-       ;;
-sunos4*)
-       opsys=sunos4
-       AC_DEFINE([SUNOS4], 1, [Define for the SunOS 4.x operating system.])
-       ;;
-solaris2* | sysv[[45]]* | irix[[56]]*)
-       opsys=svr4
-       AC_DEFINE([SVR4], 1, [Define for the System V release 4 operating
-system or a derivative like Solaris 2.x or Irix 5.x.])
-       case "$host_os" in
-       sysv4.2uw*)
-               AC_DEFINE(UNIXWARE, 2, [Define for UnixWare systems.])
-               ;;
-       sysv5*)
-               AC_DEFINE(UNIXWARE, 7, [Define for UnixWare systems.])
-               ;;
-       esac
-       ;;
-freebsd*)
-       opsys=freebsd
-       AC_DEFINE([FREEBSD], 1, [Define for the FreeBSD operating system.])
-       ;;
-*)
-       AC_MSG_RESULT([NO!])
-       AC_MSG_ERROR([operating system $host_os is not supported by strace])
-       ;;
-esac
-AC_MSG_RESULT($opsys)
-
 AC_MSG_CHECKING([for supported architecture])
 case "$host_cpu" in
 bfin)
@@ -138,10 +104,8 @@ microblaze*)
 esac
 AC_MSG_RESULT($arch)
 
-AC_SUBST(opsys)
 AC_SUBST(arch)
 
-AM_CONDITIONAL([LINUX], [test x$opsys = xlinux])
 AM_CONDITIONAL([I386], [test x$arch = xi386])
 AM_CONDITIONAL([X86_64], [test x$arch = xx86_64])
 
@@ -152,15 +116,9 @@ AC_INCLUDEDIR
 
 gl_WARN_ADD([-Wall])
 gl_WARN_ADD([-Wwrite-strings])
-if test "x$opsys" = "xsunos4"
-then
-       # SunOS 4.x header files don't declare int functions.
-       gl_WARN_ADD([-Wno-implicit])
-fi
 AC_SUBST([WARN_CFLAGS])
 
 AC_PROG_CPP
-AC_PROG_GCC_TRADITIONAL
 AC_PROG_INSTALL
 AC_C_CONST
 AC_C_BIGENDIAN
@@ -196,18 +154,11 @@ AC_RLIM_T_IS_LONG_LONG
 AC_CHECK_TYPES([struct opthdr],,, [#include <sys/socket.h>])
 AC_CHECK_TYPES([struct t_opthdr],,, [#include <sys/tiuser.h>])
 
-if test x$opsys != xlinux; then
-AC_CHECK_LIB(nsl, main)
-fi
-
 AC_CHECK_FUNCS([ \
        fork \
-       getdents \
        if_indextoname \
        inet_ntop \
-       mctl \
        prctl \
-       pread \
        sendmsg \
        sigaction \
        strerror \
@@ -224,23 +175,15 @@ AC_CHECK_HEADERS([ \
        mqueue.h \
        poll.h \
        stropts.h \
-       termio.h \
        sys/acl.h \
-       sys/aio.h \
        sys/asynch.h \
        sys/conf.h \
-       sys/door.h \
        sys/epoll.h \
        sys/filio.h \
        sys/ioctl.h \
-       sys/nscsys.h \
        sys/poll.h \
        sys/ptrace.h \
        sys/reg.h \
-       sys/stream.h \
-       sys/sysconfig.h \
-       sys/tihdr.h \
-       sys/tiuser.h \
        sys/uio.h \
        sys/vfs.h \
        asm/cachectl.h \
index 576abb0605540a22841b2396f75a982477544565..bf0e480e0d7d836a1f6c94fac6f9a9e45fe5b199 100644 (file)
@@ -2,13 +2,11 @@ dnl ### A macro to determine whether stat64 is defined.
 AC_DEFUN([AC_STAT64],
 [AC_MSG_CHECKING(for stat64 in (asm|sys)/stat.h)
 AC_CACHE_VAL(ac_cv_type_stat64,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#ifdef LINUX
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <sys/types.h>
 #include <linux/types.h>
 #include <asm/stat.h>
-#else
-#include <sys/stat.h>
-#endif]], [[struct stat64 st;]])],[ac_cv_type_stat64=yes],[ac_cv_type_stat64=no])])
+]], [[struct stat64 st;]])],[ac_cv_type_stat64=yes],[ac_cv_type_stat64=no])])
 AC_MSG_RESULT($ac_cv_type_stat64)
 if test "$ac_cv_type_stat64" = yes
 then
index 4651eca37abaca8619a35937b079b24687a9ff7d..1a2f971280f81ce525a29efc4470549156428bfd 100644 (file)
@@ -2,10 +2,10 @@ dnl ### A macro to determine whether statfs64 is defined.
 AC_DEFUN([AC_STATFS64],
 [AC_MSG_CHECKING(for statfs64 in sys/vfs.h)
 AC_CACHE_VAL(ac_cv_type_statfs64,
-[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#ifdef LINUX
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <linux/types.h>
 #include <sys/vfs.h>
-#endif]], [[struct statfs64 st;]])],[ac_cv_type_statfs64=yes],[ac_cv_type_statfs64=no])])
+]], [[struct statfs64 st;]])],[ac_cv_type_statfs64=yes],[ac_cv_type_statfs64=no])])
 AC_MSG_RESULT($ac_cv_type_statfs64)
 if test "$ac_cv_type_statfs64" = yes
 then