61
AC_ARG_WITH(perl, AC_HELP_STRING(
62
[--with-perl], [name of the Perl executable to use]),
66
AC_MSG_NOTICE([Using Perl executable $PERL])
68
AC_PATH_PROGS(PERL, [perl perl5])
70
if test -z "$PERL" ; then
71
AC_MSG_ERROR([Please specify the location of Perl with the option '--with-perl'])
75
AC_ARG_WITH(sed, AC_HELP_STRING(
76
[--with-sed], [name of the sed executable to use]),
80
AC_MSG_NOTICE([Using sed executable $SED])
87
AC_ARG_WITH(awk, AC_HELP_STRING(
88
[--with-awk], [name of the awk executable to use]),
92
AC_MSG_NOTICE([Using awk executable $AWK])
94
AC_PATH_PROGS(AWK, [gawk awk])
97
dnl Test for awk features that may be mising?
99
if test -z "$PERL" ; then
100
AC_MSG_ERROR([Please specify the location of Perl with the option '--with-perl'])
103
dnl Checks for mktemp (for creating temporary files and directories)
104
AC_ARG_WITH(mktemp, AC_HELP_STRING(
105
[--with-mktemp], [name of the mktemp executable to use (or 'none'
106
to use a quilt internal mechanism)]),
110
AC_MSG_NOTICE([Using mktemp executable $MKTEMP])
112
AC_PATH_PROG(MKTEMP, mktemp)
114
if test -z "$MKTEMP" -o "$MKTEMP" = "none" ; then
115
MKTEMP=internal_mktemp
59
QUILT_COMPAT_PROG_PATH(CP, cp, [gcp cp])
60
AC_MSG_CHECKING(whether $CP -l works)
62
if $CP -l conftest.1 conftest.2 2>/dev/null; then
67
You appear to have a `cp' that does not support hard links.
68
You can download GNU fileutils from ftp.gnu.org
72
QUILT_COMPAT_PROG_PATH(DATE, date, [gdate date])
74
if test -z "$INTERNAL_DATE"; then
75
AC_MSG_CHECKING([whether $DATE --rfc-822 works])
76
if $DATE --rfc-822 >/dev/null 2>/dev/null; then
81
If you don't have a version of `date' that supports --rfc-822, you
82
can specify '--without-date' and $PACKAGE_NAME will use its own
88
QUILT_COMPAT_PROG_PATH(PERL, perl, [perl perl5])
89
QUILT_COMPAT_PROG_PATH(GREP, grep)
91
AC_MSG_CHECKING([whether $GREP -q works])
92
if echo first | $GREP -q first 2>/dev/null; then
97
Sorry, you have a version of grep which doesn't understand -q.
98
$PACKAGE_NAME needs it. If you have access to a version of grep which does
99
understand -q, you can supply its path with the '--with-grep=' option.
103
AC_MSG_CHECKING([whether $GREP understands (foo|bar)])
104
if echo first | $GREP '^\(fir\|las\)' >/dev/null 2>&1; then
109
Sorry, you have a version of grep which doesn't understand constructs
110
of the form (foo|bar). $PACKAGE_NAME needs it. If you have access to
111
a version of grep which does understand such constructs, you can supply
112
its path with the '--with-grep=' option.
116
QUILT_COMPAT_PROG_PATH(TAIL, tail)
118
# Solaris' /usr/bin/tail doesn't understand -n.
119
AC_MSG_CHECKING([whether $TAIL -n works])
120
if test "`(echo first; echo second) | $TAIL -n 1 2>/dev/null`" = "second"; then
125
Sorry, you have a version of tail which doesn't understand -n.
126
$PACKAGE_NAME needs it. If you have access to a version of tail which does
127
understand -n, you can supply its path with the '--with-tail=' option.
128
Solaris users can use /usr/xpg4/bin/tail.
132
QUILT_COMPAT_PROG_PATH(TR, tr)
134
AC_MSG_CHECKING([whether $TR understands a-z ])
135
if test "`echo first | $TR a-z A-Z 2>/dev/null`" = "FIRST"; then
140
Sorry, you have a version of tr which doesn't understand constructs
141
of the form a-z. $PACKAGE_NAME needs it. If you have access to
142
a version of tr which does understand such constructs, you can supply
143
its path with the '--with-tr=' option.
144
Solaris users can use /usr/xpg4/bin/tr.
148
QUILT_COMPAT_PROG_PATH(SED, sed)
150
AC_MSG_CHECKING([whether $SED understands (foo|bar)])
151
if test "`echo first | $SED -e 's/\(fir\|lo\)/la/' 2>/dev/null`" = "last"; then
156
Sorry, you have a version of sed which doesn't understand constructs
157
of the form (foo|bar). $PACKAGE_NAME needs it. If you have access to
158
a version of sed which does understand such constructs, you can supply
159
its path with the '--with-sed=' option.
163
QUILT_COMPAT_PROG_PATH(AWK, awk, [gawk awk])
165
AC_MSG_CHECKING([whether $AWK supports sub])
166
if test "`echo first | $AWK 'sub(/first/, "last")' 2>/dev/null`" = "last"; then
171
Sorry, you have a version of awk which doesn't understand sub( ).
172
$PACKAGE_NAME needs it. If you have access to a version of awk
173
which does understand such constructs, you can supply its path
174
with the '--with-awk=' option.
175
Solaris users can use /usr/xpg4/bin/awk.
179
QUILT_COMPAT_PROG_PATH(POD2MAN, pod2man)
180
QUILT_COMPAT_PROG_PATH(COLUMN, column)
181
QUILT_COMPAT_PROG_PATH(GETOPT, getopt)
183
if test -z "$INTERNAL_GETOPT"; then
184
AC_MSG_CHECKING(for getopt --long syntax)
186
$GETOPT -o t --long test -- --test | grep 'illegal option' >/dev/null
187
getopt_long_errors=$?
188
$GETOPT -o t --long test -- --test | grep '^ *--test *--' >/dev/null
190
if test $getopt_long_errors -eq 1 -a $getopt_long_works -eq 0; then
195
$GETOPT does not support the --long option.
196
If you don't have a version of getopt that supports long options, you
197
can specify '--without-getopt' and $PACKAGE_NAME will use its own
203
QUILT_COMPAT_PROG_PATH(MKTEMP, mktemp)
204
if test -z "$INTERNAL_MKTEMP" ; then
117
205
AC_MSG_CHECKING(whether $MKTEMP -d works)
118
206
if tempdir=`$MKTEMP -d /tmp/$PACKAGE_NAME.XXXXXX 2>/dev/null` && \
119
207
rmdir "$tempdir" ; then
124
212
'$MKTEMP -d' does not create temporary directories.
125
213
If you don't have a version of mktemp that can create directories, you
126
can specify '--with-mktemp=none' and $PACKAGE_NAME will use its own
214
can specify '--without-mktemp' and $PACKAGE_NAME will use its own
127
215
internal tempfile generation mechanism.
133
AC_ARG_WITH(diff, AC_HELP_STRING(
134
[--with-diff], [name of the diff executable to use]),
138
AC_MSG_NOTICE([Using diff executable $DIFF])
140
AC_PATH_PROG(DIFF, diff)
142
if test -z "$DIFF"; then
143
AC_MSG_ERROR([Please specify the location of diff with the option '--with-diff'])
147
AC_ARG_WITH(patch, AC_HELP_STRING(
148
[--with-patch], [name of the patch executable to use]),
152
AC_MSG_NOTICE([Using patch executable $PATCH])
154
AC_PATH_PROG(PATCH, patch)
156
if test -z "$PATCH"; then
157
AC_MSG_ERROR([Please specify the location of patch with the option '--with-patch'])
160
# Sun's patch is a mess, issue a warning. But we are going to continue with
161
# the build because you might just be lucky.
162
AC_MSG_CHECKING([whether $PATCH will work])
163
if $PATCH -v 2>&1 | grep -q "Sun" >/dev/null 2>&1; then
166
Sorry, you have a Sun version of patch which is notoriously buggy. $PACKAGE_NAME
167
may function correctly, or minor errors may occur due to Sun's patch tool.
168
Please consider upgrading to GNU patch, if you already have GNU patch then you
169
can supply its path with the '--with-patch=' option.
171
elif $PATCH --version 2>&1 | grep -q "patch 2.0" >/dev/null 2>&1; then
174
Sorry, the version of patch you are using can cause severe problems when a patch
175
creates a directory. $PACKAGE_NAME may well function correctly with this version
176
of patch or small problems could creep in.
177
Please consider upgrading your patch to a more recent version, if you already
178
have a more recent version of patch then you can supply its path with the
179
'--with-patch=' option.
220
QUILT_COMPAT_PROG_PATH(DIFF, diff)
221
QUILT_COMPAT_PROG_PATH(PATCH, patch)
223
# Sun diff and others will not work because GNU patch options are used.
224
AC_MSG_CHECKING([the version of $DIFF])
225
if $DIFF --version 2>/dev/null | grep GNU >/dev/null; then
226
set -- `$DIFF --version 2>/dev/null | $AWK '{ print $NF; exit }'`
228
AC_MSG_RESULT($diff_version)
229
saved_IFS=$IFS; IFS='.'
232
set -- `echo $1 | $TR -cd 0-9` `echo $2 | $TR -cd 0-9`
233
if test 0$1 -lt 2 || test 0$1 -eq 2 -a 0$2 -lt 7 ; then
237
AC_MSG_RESULT(no GNU diff)
239
if test -z "$diff_version" ; then
241
$PACKAGE_NAME requires at least version 2.7 of GNU diffutils. You can
242
download a current version of patch from ftp.gnu.org, or if you already
243
have GNU diff then you can supply its path with the '--with-diff=' option.
248
# Sun's patch, and others, do not work because GNU patch options are used.
249
AC_MSG_CHECKING([the version of $PATCH])
250
if $PATCH --version 2> /dev/null | grep GNU >/dev/null; then
251
set -- `$PATCH --version 2> /dev/null`
253
AC_MSG_RESULT($patch_version)
254
saved_IFS=$IFS; IFS='.'
255
set -- $patch_version
257
set -- `echo $1 | $TR -cd 0-9` `echo $2 | $TR -cd 0-9`
258
if test 0$1 -lt 2 || test 0$1 -eq 2 -a 0$2 -lt 4 ; then
262
AC_MSG_RESULT(no GNU patch)
264
if test -z "$patch_version" ; then
266
$PACKAGE_NAME requires at least version 2.4 of GNU patch. You can download a
267
current version of patch from ftp.gnu.org, or if you already have GNU patch
268
then you can supply its path with the '--with-patch=' option.
272
QUILT_COMPAT_PROG_PATH(FIND, find)
274
AC_MSG_CHECKING([whether $FIND -path works])
275
if $FIND . -path '*' >/dev/null 2>&1; then
182
276
AC_MSG_RESULT(yes)
185
dnl Check for diffstat
186
AC_ARG_WITH(diffstat, AC_HELP_STRING(
187
[--with-diffstat], [name of the diffstat executable to use]),
191
AC_MSG_NOTICE([Using diffstat executable $DIFFSTAT])
193
AC_PATH_PROG(DIFFSTAT, diffstat)
195
if test -z "$DIFFSTAT"; then
197
diffstat utility not found; the --diffstat option of the refresh command
198
will not work correctly until diffstat is installed. If you have diffstat
199
in a directory that is not in the search path you can specify its location
200
using the '--with-diffstat' option.
205
dnl Check for sendmail
206
AC_ARG_WITH(mta, AC_HELP_STRING(
207
[--with-mta], [mail transfer agent to use]),
211
AC_MSG_NOTICE([Using mail transfer executable $MTA])
213
AC_PATH_PROG(MTA, sendmail, [], [$PATH:/usr/sbin])
215
if test -z "$MTA"; then
217
Mail transfer executable not found; the --send option of the mail command
218
will not work correctly. If you have a mail transfer agent in a directory
219
that is not in the search path you can specify its location using the
280
Sorry, you have a version of find which doesn't understand -path.
281
$PACKAGE_NAME needs it. If you have access to a version of find which
282
does understand -path, you can supply its path with the
283
'--with-find=' option.
287
QUILT_COMPAT_PROG_PATH(DIFFSTAT, diffstat)
289
if test -z "$INTERNAL_DIFFSTAT"; then
290
# We need diffstat version 1.32 or better, else quilt refresh --diffstat
291
# will show progress data we don't want to see. This is only a warning
292
# and we continue even if version is older, as this is only a minor
294
AC_MSG_CHECKING([for diffstat version])
295
diffstat_version=`$DIFFSTAT -V 2>/dev/null | \
296
sed 's/^[[^0-9]]*\([[0-9]]*\)\.\([[0-9]]*\).*/\1 \2/'`
297
eval set -- "$diffstat_version"
298
diffstat_major_version="$1"
299
diffstat_minor_version="$2"
300
if test -z "$diffstat_major_version" -o -z "$diffstat_minor_version"; then
301
AC_MSG_RESULT(unknown)
303
diffstat utility version couldn't be checked; chances are good that the
304
--diffstat option of the refresh command will not work properly.
307
AC_MSG_RESULT($diffstat_major_version.$diffstat_minor_version)
308
if test "$diffstat_major_version" -lt 1 \
309
-o \( "$diffstat_major_version" -eq 1 -a "$diffstat_minor_version" -lt 32 \); then
311
diffstat utility is too old; the --diffstat option of the refresh command
312
will not work correctly until a newer version (>= 1.32) is installed.
318
QUILT_COMPAT_PROG_PATH(SENDMAIL, sendmail, [], [/usr/sbin])
320
AC_PATH_PROG(MSGMERGE, [msgmerge])
321
AC_PATH_PROG(MSGFMT, [msgfmt])
322
AC_PATH_PROG(XGETTEXT, [xgettext])
323
AC_PATH_PROG(MSGUNIQ, [msguniq])
324
AC_PATH_PROG(MSGCAT, [msgcat])
325
if test -n "$MSGFMT" -a -n "$MSGMERGE" -a -n "$XGETTEXT" -a -n "$MSGUNIQ" -a -n "$MSGCAT" ; then
226
332
AC_ARG_ENABLE(nls, AC_HELP_STRING(
227
[--enable-nls], [include natural language support]))
228
if test "$enableval" != "no"; then
229
AC_PATH_PROG(MSGFMT, msgfmt)
231
if test "$enableval" = "yes" -a -z "$MSGFMT" ; then
333
[--disable-nls], [exclude natural language support]),
334
[USE_NLS=$enableval],[USE_NLS=$HAVE_NLS])
336
if test $USE_NLS = yes -a $HAVE_NLS = no ; then
233
338
You do not appear to have msgfmt, which is part of the GNU Gettext package. It
234
339
is a required package as you chose the '--enable-nls' option to configure.
235
340
You can download GNU Gettext from ftp.gnu.org
238
if test -z "$MSGFMT" ; then
344
AC_ARG_WITH(patch-wrapper, AC_HELP_STRING(
345
[--with-patch-wrapper], [include GNU patch wrapper]))
346
PATCH_WRAPPER=$withval
347
AC_SUBST(PATCH_WRAPPER)
349
if test $USE_NLS = no ; then
239
350
AC_MSG_NOTICE([Building without natural language support])
242
354
dnl Determine where package documentation is supposed to go
243
355
if test -n "$RPM_DOC_DIR" ; then