/ [paxutils] / paxutils / configure.ac
To checkout: cvs -d:pserver:anonymous@cvs.gnu.org.ua:/cvsmirror/paxutils co paxutils/configure.ac
Puszcza

Contents of /paxutils/configure.ac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations)
Thu Oct 11 21:51:57 2007 UTC (14 years ago) by eggert
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
* gnulib.modules: Add strerror.

* configure.ac: Don't test for strerror any more; the gnulib
strerror module handles this.
* m4/rmt.m4 (PU_RMT): Likewise.

1 # This file is part of GNU paxutils
2 #
3 # Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
4 #
5 # GNU paxutils is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by the
7 # Free Software Foundation; either version 3, or (at your option) any later
8 # version.
9 #
10 # GNU paxutils program is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
13 # Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License along
16 # with GNU paxutils; if not, write to the Free Software Foundation, Inc.,
17 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
19 AC_INIT([GNU paxutils], [0.0.1], [bug-paxutils@gnu.org])
20 AC_CONFIG_SRCDIR([paxtest/paxtest.c])
21 AC_CONFIG_AUX_DIR([build-aux])
22 AC_CONFIG_HEADERS([config.h])
23 AC_PREREQ([2.59])
24 AM_INIT_AUTOMAKE([1.8 gnits dist-bzip2 dist-shar std-options])
25
26 gl_USE_SYSTEM_EXTENSIONS
27 AC_PROG_CC
28 AC_EXEEXT
29 AC_PROG_RANLIB
30 AC_SYS_LARGEFILE
31 AC_ISC_POSIX
32 AC_C_INLINE
33
34 AC_CHECK_HEADERS(fcntl.h linux/fd.h memory.h net/errno.h \
35 sgtty.h string.h \
36 sys/param.h sys/device.h sys/gentape.h \
37 sys/inet.h sys/io/trioctl.h \
38 sys/mtio.h sys/tprintf.h sys/tape.h \
39 unistd.h locale.h)
40
41 AC_CHECK_HEADERS([sys/buf.h], [], [],
42 [#if HAVE_SYS_PARAM_H
43 #include <sys/param.h>
44 #endif])
45
46 AC_HEADER_SYS_WAIT
47 AM_STDBOOL_H
48
49 AC_HEADER_DIRENT
50 AC_HEADER_MAJOR
51 AC_HEADER_STAT
52 AC_HEADER_STDC
53 AC_STRUCT_ST_BLKSIZE
54 AC_STRUCT_ST_BLOCKS
55 AC_MSG_CHECKING([for st_fstype string in struct stat])
56 AC_CACHE_VAL(diff_cv_st_fstype_string,
57 [AC_TRY_COMPILE([#include <sys/types.h>
58 #include <sys/stat.h>], [struct stat s; s.st_fstype[0] = 'x';],
59 diff_cv_st_fstype_string=yes,
60 diff_cv_st_fstype_string=no)])
61 AC_MSG_RESULT($diff_cv_st_fstype_string)
62 if test $diff_cv_st_fstype_string = yes; then
63 AC_DEFINE(HAVE_ST_FSTYPE_STRING, 1,
64 [Define if struct stat has a char st_fstype[] member.])
65 fi
66
67 AC_TYPE_SIGNAL
68 AC_TYPE_MODE_T
69 AC_TYPE_PID_T
70 AC_TYPE_OFF_T
71 AC_TYPE_SIZE_T
72 AC_TYPE_UID_T
73 AC_CHECK_TYPE(major_t, , AC_DEFINE(major_t, int,
74 [Type of major device numbers.]))
75 AC_CHECK_TYPE(minor_t, , AC_DEFINE(minor_t, int,
76 [Type of minor device numbers.]))
77 AC_CHECK_TYPE(dev_t, unsigned)
78 AC_CHECK_TYPE(ino_t, unsigned)
79
80 gt_TYPE_SSIZE_T
81 gl_AC_TYPE_INTMAX_T
82 jm_AC_TYPE_UINTMAX_T
83
84 MU_DEBUG_MODE
85
86 # gnulib modules
87 paxutils_GNULIB
88
89 PU_RMT
90 PU_RTAPELIB
91 PU_SYSTEM
92
93 AC_CHECK_FUNCS(fsync lstat mkfifo readlink symlink setlocale utimes)
94 AC_CHECK_DECLS([getgrgid],,, [#include <grp.h>])
95 AC_CHECK_DECLS([getpwuid],,, [#include <pwd.h>])
96
97 # Set LIB_SETSOCKOPT to -lnsl -lsocket if necessary.
98 tar_save_LIBS=$LIBS
99 LIB_SETSOCKOPT=
100 AC_SEARCH_LIBS(setsockopt, [socket], ,
101 [AC_SEARCH_LIBS(setsockopt, [socket], , , [-lnsl])])
102 AC_SEARCH_LIBS(setsockopt, [nsl])
103
104 case "$ac_cv_search_setsockopt" in
105 -l*) LIB_SETSOCKOPT=$ac_cv_search_setsockopt
106 esac
107 AC_SUBST(LIB_SETSOCKOPT)
108 LIBS=$tar_save_LIBS
109
110 AC_REPLACE_FUNCS(waitpid)
111
112 AC_CACHE_CHECK(for remote shell, tar_cv_path_RSH,
113 [if test -n "$RSH"; then
114 tar_cv_path_RSH=$RSH
115 else
116 tar_cv_path_RSH=no
117 for ac_file in /usr/ucb/rsh /usr/bin/remsh /usr/bin/rsh /usr/bsd/rsh \
118 /usr/bin/nsh /usr/bin/rcmd
119 do
120 # Prefer a non-symlink rsh to a symlink one, so that binaries built
121 # on AIX 4.1.4, where /usr/ucb/rsh is a symlink to /usr/bin/rsh
122 # will run on AIX 4.3.0, which has only /usr/bin/rsh.
123 if test -f $ac_file; then
124 if (test -h $ac_file) 2>/dev/null; then
125 test $tar_cv_path_RSH = no && tar_cv_path_RSH=$ac_file
126 else
127 tar_cv_path_RSH=$ac_file
128 break
129 fi
130 fi
131 done
132 fi])
133 if test $tar_cv_path_RSH = no; then
134 AC_CHECK_HEADERS(netdb.h)
135 else
136 AC_DEFINE_UNQUOTED(REMOTE_SHELL, "$tar_cv_path_RSH",
137 [Define to the full path of your rsh, if any.])
138 fi
139
140 AC_MSG_CHECKING(for default archive format)
141
142 AC_ARG_VAR([DEFAULT_ARCHIVE_FORMAT],
143 [Set the default archive format. Allowed values are: V7, OLDGNU, USTAR, POSIX, GNU. Default is GNU])
144
145 if test -z "$DEFAULT_ARCHIVE_FORMAT"; then
146 DEFAULT_ARCHIVE_FORMAT="GNU"
147 fi
148 case $DEFAULT_ARCHIVE_FORMAT in
149 V7|OLDGNU|USTAR|POSIX|GNU) ;;
150 *) AC_MSG_ERROR(Invalid format name);;
151 esac
152 AC_DEFINE_UNQUOTED(DEFAULT_ARCHIVE_FORMAT, ${DEFAULT_ARCHIVE_FORMAT}_FORMAT,
153 [By default produce archives of this format])
154 AC_MSG_RESULT($DEFAULT_ARCHIVE_FORMAT)
155
156 AC_MSG_CHECKING(for default archive)
157
158 AC_ARG_VAR([DEFAULT_ARCHIVE],
159 [Set the name of the default archive (default: -)])
160 if test -z "$DEFAULT_ARCHIVE"; then
161 DEFAULT_ARCHIVE=-
162 else
163 if test -z "`ls $DEFAULT_ARCHIVE 2>/dev/null`"; then
164 AC_MSG_WARN(DEFAULT_ARCHIVE \`$DEFAULT_ARCHIVE' not found on this system)
165 fi
166 # FIXME: Look for DEFTAPE in <sys/mtio.h>.
167 # FIXME: Let DEVICE_PREFIX be configured from the environment.
168 # FIXME: Rearrange, here.
169 case $DEFAULT_ARCHIVE in
170 *[[0-7][lmh]])
171 AC_DEFINE(DENSITY_LETTER, 1,
172 [[Define to 1 if density may be indicated by [lmh] at end of device.]])
173 device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/[0-7][lmh]$//'`
174 ;;
175 *[[0-7]])
176 device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/[0-7]$//'`
177 ;;
178 *)
179 device_prefix=
180 ;;
181 esac
182 case "$device_prefix" in
183 ?*)
184 AC_DEFINE_UNQUOTED(DEVICE_PREFIX, "$device_prefix",
185 [Define to a string giving the prefix of the default device, without the part specifying the unit and density.])
186 ;;
187 esac
188 fi
189 AC_DEFINE_UNQUOTED(DEFAULT_ARCHIVE, "$DEFAULT_ARCHIVE",
190 [Define to a string giving the full name of the default archive file.])
191 AC_MSG_RESULT($DEFAULT_ARCHIVE)
192
193 AC_ARG_VAR([DEFAULT_BLOCKING],
194 [Define default blocking factor (default: 20)])
195 AC_MSG_CHECKING(for default blocking)
196 DEFAULT_BLOCKING=${DEFAULT_BLOCKING-20}
197 AC_DEFINE_UNQUOTED(DEFAULT_BLOCKING, $DEFAULT_BLOCKING,
198 [Define to a number giving the default blocking size for archives.])
199 AC_MSG_RESULT($DEFAULT_BLOCKING)
200
201 # Iconv
202 AM_ICONV
203 AC_CHECK_HEADERS(iconv.h)
204 AC_CHECK_TYPE(iconv_t,:,
205 AC_DEFINE(iconv_t, int,
206 [Conversion descriptor type]),
207 [
208 #ifdef HAVE_ICONV_H
209 # include <iconv.h>
210 #endif
211 ])
212
213 # Gettext.
214 AM_GNU_GETTEXT([external], [need-ngettext])
215 AM_GNU_GETTEXT_VERSION(0.12.1)
216
217 # Initialize the test suite.
218 # AC_CONFIG_TESTDIR(tests)
219 # AC_CONFIG_FILES([tests/Makefile tests/atlocal])
220 AM_MISSING_PROG([AUTOM4TE], [autom4te])
221
222 AC_SUBST(BACKUP_LIBEXEC_SCRIPTS)
223 AC_SUBST(BACKUP_SBIN_SCRIPTS)
224 AC_ARG_ENABLE(backup-scripts,
225 AC_HELP_STRING([--enable-backup-scripts],
226 [Create and install backup and restore scripts]),
227 [case $enableval in
228 yes) BACKUP_LIBEXEC_SCRIPTS='$(BACKUP_LIBEXEC_SCRIPTS_LIST)'
229 BACKUP_SBIN_SCRIPTS='$(BACKUP_SBIN_SCRIPTS_LIST)'
230 ;;
231 esac])
232
233 AC_SUBST(BACKUP_SED_COND)
234 if date +%Y-%m-%d 2>/dev/null >&2; then
235 BACKUP_SED_COND='/^\#ELSE_DATE_FORMAT_OK/,/^\#ENDIF_DATE_FORMAT_OK/d;/^\#IF_DATE_FORMAT_OK/d'
236 else
237 BACKUP_SED_COND='/^\#IF_DATE_FORMAT_OK/,/^\#ELSE_DATE_FORMAT_OK/d;/^\#ENDIF_DATE_FORMAT_OK/d'
238 fi
239
240
241 AC_OUTPUT([Makefile\
242 lib/Makefile\
243 paxlib/Makefile\
244 po/Makefile.in\
245 paxtest/Makefile])

Send suggestions and bug reports to Sergey Poznyakoff
ViewVC Help
Powered by ViewVC 1.1.20