summaryrefslogtreecommitdiff
path: root/am
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-03-07 16:14:07 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-03-07 16:24:34 +0200
commitfb45630880343afb95c43fcbbb6883119e4e961a (patch)
tree09a1589c29010a7d5532ba9c2864a6b57c5437ca /am
parent8109596484d8910dd790b96f362095ee9de9e617 (diff)
downloadpaxutils-fb45630880343afb95c43fcbbb6883119e4e961a.tar.gz
Migrate to Git
Diffstat (limited to 'am')
-rw-r--r--am/.cvsignore70
-rw-r--r--am/DISTFILES3
-rw-r--r--am/rmt.m471
-rw-r--r--am/rtapelib.m43
-rw-r--r--am/system.m429
5 files changed, 176 insertions, 0 deletions
diff --git a/am/.cvsignore b/am/.cvsignore
new file mode 100644
index 0000000..cb68a60
--- /dev/null
+++ b/am/.cvsignore
@@ -0,0 +1,70 @@
+alloca.m4
+argp.m4
+codeset.m4
+debug.m4
+dirname.m4
+dos.m4
+eoverflow.m4
+error.m4
+extensions.m4
+fileblocks.m4
+getopt.m4
+gettext.m4
+gettext_gl.m4
+glibc2.m4
+glibc21.m4
+glibc21_gl.m4
+gnulib.m4
+iconv.m4
+intdiv0.m4
+intmax.m4
+intmax_t.m4
+inttostr.m4
+inttypes-pri.m4
+inttypes.m4
+inttypes_h.m4
+inttypes_h_gl.m4
+isc-posix.m4
+lcmessage.m4
+lib-ld.m4
+lib-ld_gl.m4
+lib-link.m4
+lib-prefix.m4
+lib-prefix_gl.m4
+longdouble.m4
+longlong.m4
+mempcpy.m4
+nls.m4
+onceonly.m4
+po.m4
+po_gl.m4
+printf-posix.m4
+progtest.m4
+restrict.m4
+safe-read.m4
+safe-write.m4
+savedir.m4
+signed.m4
+size_max.m4
+ssize_t.m4
+stdbool.m4
+stdint_h.m4
+stdint_h_gl.m4
+strcase.m4
+strchrnul.m4
+strerror_r.m4
+strndup.m4
+strnlen.m4
+strtol.m4
+sysexits.m4
+uintmax_t.m4
+uintmax_t_gl.m4
+ulonglong.m4
+ulonglong_gl.m4
+unlocked-io.m4
+vasnprintf.m4
+vsnprintf.m4
+wchar_t.m4
+wint_t.m4
+xalloc.m4
+xsize.m4
diff --git a/am/DISTFILES b/am/DISTFILES
new file mode 100644
index 0000000..2639531
--- /dev/null
+++ b/am/DISTFILES
@@ -0,0 +1,3 @@
+rmt.m4
+rtapelib.m4
+system.m4
diff --git a/am/rmt.m4 b/am/rmt.m4
new file mode 100644
index 0000000..5225a6b
--- /dev/null
+++ b/am/rmt.m4
@@ -0,0 +1,71 @@
+
+AC_DEFUN([PU_RMT],[
+ # Set LIB_SETSOCKOPT to -lnsl -lsocket if necessary.
+ pu_save_LIBS=$LIBS
+ LIB_SETSOCKOPT=
+ AC_SEARCH_LIBS(setsockopt, [socket], ,
+ [AC_SEARCH_LIBS(setsockopt, [socket], , , [-lnsl])])
+ AC_SEARCH_LIBS(setsockopt, [nsl])
+
+ case "$ac_cv_search_setsockopt" in
+ -l*) LIB_SETSOCKOPT=$ac_cv_search_setsockopt
+ esac
+ AC_SUBST(LIB_SETSOCKOPT)
+ LIBS=$pu_save_LIBS
+
+ enable_rmt() {
+ if test $ac_cv_header_sys_mtio_h = yes; then
+ AC_CACHE_CHECK(for remote tape header files, pu_cv_header_rmt,
+ [AC_TRY_CPP([
+#if HAVE_SGTTY_H
+# include <sgtty.h>
+#endif
+#include <sys/socket.h>],
+ pu_cv_header_rmt=yes,
+ pu_cv_header_rmt=no)])
+ test $pu_cv_header_rmt = yes && PU_RMT_PROG='rmt$(EXEEXT)'
+ AC_SUBST(PU_RMT_PROG)
+ fi
+ }
+
+ AC_CHECK_HEADERS([sys/mtio.h])
+ AC_CACHE_CHECK(which ioctl field to test for reversed bytes,
+ pu_cv_header_mtio_check_field,
+ [AC_EGREP_HEADER(mt_model, sys/mtio.h,
+ pu_cv_header_mtio_check_field=mt_model,
+ pu_cv_header_mtio_check_field=mt_type)])
+ AC_DEFINE_UNQUOTED(MTIO_CHECK_FIELD,
+ $pu_cv_header_mtio_check_field,
+ [Define to mt_model (v.g., for DG/UX), else to mt_type.])
+
+
+ AC_ARG_VAR([DEFAULT_RMT_DIR],
+ [Define full file name of the directory where to install `rmt'. (default: $(libexecdir))])
+ if test "x$DEFAULT_RMT_DIR" != x; then
+ DEFAULT_RMT_COMMAND=$DEFAULT_RMT_DIR/rmt
+ else
+ DEFAULT_RMT_DIR='$(libexecdir)'
+ fi
+
+ AC_MSG_CHECKING([whether to build rmt])
+ AC_ARG_WITH([rmt],
+ AC_HELP_STRING([--with-rmt=FILE],
+ [Use FILE as the default `rmt' program. Do not build included copy of `rmt'.]),
+ [case $withval in
+ yes|no) AC_MSG_ERROR([Invalid argument to --with-rmt]);;
+ /*) DEFAULT_RMT_COMMAND=$withval
+ AC_MSG_RESULT([no, use $withval instead]);;
+ *) AC_MSG_ERROR([Argument to --with-rmt must be an absolute file name]);;
+ esac],
+ [AC_MSG_RESULT([yes])
+ enable_rmt
+ if test "$PU_RMT_PROG" = ""; then
+ AC_MSG_WARN([not building rmt, required header files are missing])
+ fi])
+
+ AC_SUBST(DEFAULT_RMT_COMMAND)
+ if test "x$DEFAULT_RMT_COMMAND" != x; then
+ AC_DEFINE_UNQUOTED(DEFAULT_RMT_COMMAND, "$DEFAULT_RMT_COMMAND",
+ [Define full file name of rmt program.])
+ fi
+])
diff --git a/am/rtapelib.m4 b/am/rtapelib.m4
new file mode 100644
index 0000000..7b2c503
--- /dev/null
+++ b/am/rtapelib.m4
@@ -0,0 +1,3 @@
+AC_DEFUN([PU_RTAPELIB],[
+ AC_CHECK_HEADERS_ONCE([net/errno.h sys/inet.h netdb.h])
+])
diff --git a/am/system.m4 b/am/system.m4
new file mode 100644
index 0000000..c208220
--- /dev/null
+++ b/am/system.m4
@@ -0,0 +1,29 @@
+# Configuration for paxutils/lib/system.h.
+
+# Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([PU_SYSTEM],[
+ AC_REQUIRE([AC_HEADER_STDC])
+
+ AC_CHECK_HEADERS_ONCE([string.h memory.h fcntl.h sys/wait.h \
+ sys/gentape.h sys/tape.h sys/device.h sys/param.h sys/tprintf.h sys/mtio.h \
+ sgtty.h sys/io/trioctl.h locale.h pwd.h grp.h])
+
+ AC_CHECK_HEADERS([sys/buf.h], [], [],
+ [#if HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif])
+
+ AC_REQUIRE([AC_HEADER_TIME])
+
+ AC_CHECK_MEMBERS([struct stat.st_blksize]) dnl instead of AC_STRUCT_ST_BLKSIZE
+ AC_REQUIRE([AC_STRUCT_ST_BLOCKS])
+ AC_REQUIRE([AC_STRUCT_ST_BLKSIZE])
+
+ AC_CHECK_FUNCS_ONCE(lstat mkfifo setlocale)
+ AC_REQUIRE([gl_INTTOSTR])
+ AC_REQUIRE([gl_STDINT_H])
+])