From: Dmitry V. Levin Date: Sat, 25 Feb 2012 14:34:10 +0000 (+0100) Subject: Remove parts of automake machinery which are not needed on Linux X-Git-Tag: v4.7~151 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee245d8ca36ce90212db3684528c9ed68f92d643;p=strace Remove parts of automake machinery which are not needed on Linux 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 Signed-off-by: Denys Vlasenko --- diff --git a/Makefile.am b/Makefile.am index 97cd43b8..5ac0c9d6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/configure.ac b/configure.ac index 6eb9a03e..d1513ca8 100644 --- a/configure.ac +++ b/configure.ac @@ -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 ]) AC_CHECK_TYPES([struct t_opthdr],,, [#include ]) -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 \ diff --git a/m4/stat.m4 b/m4/stat.m4 index 576abb06..bf0e480e 100644 --- a/m4/stat.m4 +++ b/m4/stat.m4 @@ -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 -#ifdef LINUX +[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include #include #include -#else -#include -#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 diff --git a/m4/statfs.m4 b/m4/statfs.m4 index 4651eca3..1a2f9712 100644 --- a/m4/statfs.m4 +++ b/m4/statfs.m4 @@ -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 #include -#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