+Wed Jul 26 00:03:26 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
+
+ * Test release 2.4.2.
+
+ * acgeneral.m4 (AC_CHECK_SIZEOF): Take an optional size to
+ use when cross-compiling.
+
+ * acspecific.m4 (AC_FUNC_CLOSEDIR_VOID, AC_DIR_HEADER): If
+ cross-compiling, assume it returns void. It's not a big loss.
+ From Karl Berry.
+
+ * acgeneral.m4 autoheader.sh: Change tr [a-z] [A-Z] into expansion
+ of the full alphabet, to combat losing AIX 4.1.1 tr when LANG
+ isn't set the way it likes.
+
+ * acspecific.m4 (AC_FUNC_GETMNTENT): Check in -lgen for Unixware.
+ From miguel@roxanne.nuclecu.unam.mx (Miguel de Icaza).
+
+ * autoheader.m4 (AC_CONFIG_HEADER): Set config_h to the first
+ argument. From ghudson@mit.edu (Greg Hudson).
+
+ * Makefile.in (all): Depend on info.
+
+ * acgeneral.m4 (AC_CHECK_PROG, AC_PATH_PROG, AC_CHECK_PROGS,
+ AC_PATH_PROGS, AC_CHECK_TOOL): Add optional PATH
+ parameter.
+
Mon Jul 24 17:27:11 1995 David J. MacKenzie <djm@catapult.va.pubnix.com>
* acgeneral.m4 (AC_CHECK_LIB): Don't enclose tr args in [], for
's,@''M4''@,$(M4),g' -e 's,@''AWK''@,$(AWK),g'
editpl = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''PERL''@,$(PERL),g'
-all: ${SCRIPTS}
+all: ${SCRIPTS} info
.SUFFIXES:
.SUFFIXES: .sh .pl
* New configure options --bindir, --libdir, --datadir, etc., with
corresponding output variables.
-* New macro: AC_CACHE_CHECK.
+* New macro: AC_CACHE_CHECK, to make using the cache easier.
* config.log contains the command being run as well as any output from it.
-* AC_CHECK_LIB can check for libraries with "." or "/" in their name.
+* AC_CHECK_LIB can check for libraries with "." or "/" or "+" in their name.
* AC_PROG_INSTALL doesn't cache a path to install-sh, for sharing caches.
+* AC_CHECK_PROG, AC_PATH_PROG, AC_CHECK_PROGS, AC_PATH_PROGS, and
+ AC_CHECK_TOOL can search a path other than $PATH.
+* AC_CHECK_SIZEOF takes an optional size to use when cross-compiling.
\f
Major changes in release 2.4:
------------------------------------------------------------------------------
-I would find it a wonderful boon if config.log contained not just the
-output from the compilers, but also the invocation. Almost all
-the errors I've found are due to the wrong options getting passed for
-one reason or another.
-
-Saving the input test file(s) that failed would be useful, too.
-From: "K. Berry" <kb@cs.umb.edu>
-
-------------------------------------------------------------------------------
-
The default of unlimited permission is fine, but there should be some easy
way for configure to have copyright terms passed through from configure.in.
Maybe AC_LICENSE([...]).
divert(-1)dnl Throw away output until AC_INIT is called.
changequote([, ])
-define(AC_ACVERSION, 2.4.1)
+define(AC_ACVERSION, 2.4.2)
dnl Some old m4's don't support m4exit. But they provide
dnl equivalent functionality by core dumping because of the
dnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND
-dnl [, VALUE-IF-NOT-FOUND])
+dnl [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(AC_CHECK_PROG,
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
ac_cv_prog_$1="[$]$1" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
+ for ac_dir in ifelse([$4], , $PATH, [$4]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_$1="$3"
AC_SUBST($1)dnl
])
-dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND])
+dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(AC_PATH_PROG,
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
+ for ac_dir in ifelse([$4], , $PATH, [$4]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_$1="$ac_dir/$ac_word"
AC_SUBST($1)dnl
])
-dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND])
+dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
+dnl [, PATH]])
AC_DEFUN(AC_CHECK_PROGS,
[for ac_prog in $2
do
-AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, )
+AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, , $4)
test -n "[$]$1" && break
done
ifelse([$3], , , [test -n "[$]$1" || $1="$3"
])])
-dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND])
+dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
+dnl [, PATH]])
AC_DEFUN(AC_PATH_PROGS,
[for ac_prog in $2
do
-AC_PATH_PROG($1, [$]ac_prog)
+AC_PATH_PROG($1, [$]ac_prog, , $4)
test -n "[$]$1" && break
done
ifelse([$3], , , [test -n "[$]$1" || $1="$3"
fi
])
-dnl AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND])
+dnl AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(AC_CHECK_TOOL,
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
- ifelse([$3], , [$2], ))
+ ifelse([$3], , [$2], ), $4)
ifelse([$3], , , [
if test -z "$ac_cv_prog_$1"; then
if test -n "$ac_tool_prefix"; then
AC_MSG_RESULT(yes)
ifelse([$3], ,
[changequote(, )dnl
- ac_tr_lib=HAVE_LIB`echo $1 | tr '[a-z]' '[A-Z]'`
+ ac_tr_lib=HAVE_LIB`echo $1 | tr 'abcdedfghijklmnopqrstuvwxyz' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ'`
changequote([, ])dnl
AC_DEFINE_UNQUOTED($ac_tr_lib)
LIBS="-l$1 $LIBS"
do
AC_CHECK_HEADER($ac_hdr,
[changequote(, )dnl
- ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
+ ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
changequote([, ])dnl
AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3)dnl
done
do
AC_CHECK_FUNC($ac_func,
[changequote(, )dnl
- ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdedfghijklmnopqrstuvwxyz' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ'`
changequote([, ])dnl
AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl
done
dnl ### Checking compiler characteristics
-dnl AC_CHECK_SIZEOF(TYPE)
+dnl AC_CHECK_SIZEOF(TYPE [, CROSS-SIZE])
AC_DEFUN(AC_CHECK_SIZEOF,
[changequote(<<, >>)dnl
dnl The name to #define.
if (!f) exit(1);
fprintf(f, "%d\n", sizeof($1));
exit(0);
-}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0)])dnl
+}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
AC_MSG_RESULT($AC_CV_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
undefine([AC_TYPE_NAME])dnl
ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g
])dnl
" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
+dnl This would break Makefile dependencies.
+dnl if cmp -s $ac_file conftest.out 2>/dev/null; then
+dnl echo "$ac_file is unchanged"
+dnl rm -f conftest.out
+dnl else
+dnl rm -f $ac_file
+dnl mv conftest.out $ac_file
+dnl fi
fi; done
rm -f conftest.subs
])
do
AC_CHECK_HEADER_DIRENT($ac_hdr,
[changequote(, )dnl
- ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
+ ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
changequote([, ])dnl
AC_DEFINE_UNQUOTED($ac_tr_hdr) $2])dnl
done])
[AC_TRY_RUN([#include <sys/types.h>
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
- ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])
+ ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
if test $ac_cv_func_closedir_void = yes; then
AC_DEFINE(VOID_CLOSEDIR)
fi
[AC_TRY_RUN([#include <sys/types.h>
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
- ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])
+ ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
if test $ac_cv_func_closedir_void = yes; then
AC_DEFINE(CLOSEDIR_VOID)
fi
])
AC_DEFUN(AC_FUNC_GETMNTENT,
-[# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX.
+[# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS",
- [AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS")])
+ [AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS",
+ [AC_CHECK_LIB(gen, getmntent, LIBS="-lgen $LIBS")])])
AC_CHECK_FUNC(getmntent, [AC_DEFINE(HAVE_GETMNTENT)])])
AC_DEFUN(AC_FUNC_STRFTIME,
@c @setchapternewpage odd
@c %**end of header
-@set EDITION 2.4.1
-@set VERSION 2.4.1
-@set UPDATED June 1995
+@set EDITION 2.4.2
+@set VERSION 2.4.2
+@set UPDATED July 1995
@iftex
@finalout
whitespace-separated list of output files; it may be empty. This macro
creates each file @file{@var{file}} by copying an input file (by default
named @file{@var{file}.in}), substituting the output variable values.
+@c If the file would be unchanged, it is left untouched, to preserve its timestamp.
@xref{Makefile Substitutions}, for more information on using output variables.
@xref{Setting Output Variables}, for more information on creating them. This
macro creates the directory that the file is in if it doesn't exist (but
The @code{autoheader} program can create a template file of C
@samp{#define} statements for @code{configure} to use. If
@file{configure.in} invokes @code{AC_CONFIG_HEADER(@var{file})},
-@code{autoheader} creates @file{@var{file}.in}. Otherwise,
+@code{autoheader} creates @file{@var{file}.in}; if multiple file
+arguments are given, the first one is used. Otherwise,
@code{autoheader} creates @file{config.h.in}.
If you give @code{autoheader} an argument, it uses that file instead of
These macros are used to find programs not covered by the particular
test macros. If you need to check the behavior of a program as well as
-find out whether it is present, you have to write your own test for
-it (@pxref{Writing Tests}). If you need to check for a program that
-might not be in the user's @code{PATH}, you can temporarily add to it:
+find out whether it is present, you have to write your own test for it
+(@pxref{Writing Tests}). By default, these macros use the environment
+variable @code{PATH]. If you need to check for a program that might not
+be in the user's @code{PATH}, you can pass a modified path to use
+instead, like this:
@example
-ac_save_path="$PATH"
-PATH=/usr/libexec:/usr/sbin:/usr/etc:/etc:/usr/bin:/bin
-AC_PATH_PROG(INETD, inetd, /usr/libexec/inetd)
-PATH="$ac_save_path"
+AC_PATH_PROG(INETD, inetd, /usr/libexec/inetd,
+ $PATH:/usr/libexec:/usr/sbin:/usr/etc:etc)
@end example
-@noindent
-Keep @file{/usr/bin:/bin} in the @code{PATH} so if if the @code{echo} or
-@code{test} command is in one of those directories, @code{configure} can
-still find it.
-
-@defmac AC_CHECK_PROG (@var{variable}, @var{prog-to-check-for}, @var{value-if-found} @r{[}, @var{value-if-not-found}@r{]})
+@defmac AC_CHECK_PROG (@var{variable}, @var{prog-to-check-for}, @var{value-if-found} @r{[}, @var{value-if-not-found} @r{[}, @var{path}@r{]]})
@maindex CHECK_PROG
Check whether program @var{prog-to-check-for} exists in @code{PATH}. If
it is found, set @var{variable} to @var{value-if-found}, otherwise to
do nothing. Calls @code{AC_SUBST} for @var{variable}.
@end defmac
-@defmac AC_CHECK_PROGS (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found}@r{]})
+@defmac AC_CHECK_PROGS (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found} @r{[}, @var{path}@r{]]})
@maindex CHECK_PROGS
Check for each program in the whitespace-separated list
@var{progs-to-check-for} exists in @code{PATH}. If it is found, set
is not changed. Calls @code{AC_SUBST} for @var{variable}.
@end defmac
-@defmac AC_CHECK_TOOL (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found}@r{]})
+@defmac AC_CHECK_TOOL (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found} @r{[}, @var{path}@r{]]})
@maindex CHECK_TOOL
Like @code{AC_CHECK_PROG}, but first looks for @var{prog-to-check-for}
with a prefix of the host type as determined by @code{AC_CANONICAL_HOST},
or to @samp{:} if neither program exists.
@end defmac
-@defmac AC_PATH_PROG (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found}@r{]})
+@defmac AC_PATH_PROG (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found} @r{[}, @var{path}@r{]]})
@maindex PATH_PROG
Like @code{AC_CHECK_PROG}, but set @var{variable} to the entire
path of @var{prog-to-check-for} if found.
@end defmac
-@defmac AC_PATH_PROGS (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found}@r{]})
+@defmac AC_PATH_PROGS (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found} @r{[}, @var{path}@r{]]})
@maindex PATH_PROGS
Like @code{AC_CHECK_PROGS}, but if any of @var{progs-to-check-for}
are found, set @var{variable} to the entire path of the program
@defmac AC_FUNC_GETMNTENT
@maindex FUNC_GETMNTENT
@cvindex HAVE_GETMNTENT
-Check for @code{getmntent} in the @file{sun} and @file{seq}
-libraries, for Irix 4 and PTX, respectively. Then, if @code{getmntent} is
-available, define @code{HAVE_GETMNTENT}.
+Check for @code{getmntent} in the @file{sun}, @file{seq}, and @file{gen}
+libraries, for Irix 4, PTX, and Unixware, respectively. Then, if
+@code{getmntent} is available, define @code{HAVE_GETMNTENT}.
@end defmac
@defmac AC_FUNC_GETPGRP
that define @code{__STDC__} do not support @code{long double}.
@end defmac
-@defmac AC_CHECK_SIZEOF (@var{type})
+@defmac AC_CHECK_SIZEOF (@var{type} @r{[}, @var{cross-size}@r{]})
@maindex CHECK_SIZEOF
Define @code{SIZEOF_@var{uctype}} to be the size in bytes of the C (or
C++) builtin type @var{type}, e.g. @samp{int} or @samp{char *}. If
@samp{type} is unknown to the compiler, it gets a size of 0. @var{uctype}
is @var{type}, with lowercase converted to uppercase, spaces changed to
-underscores, and asterisks changed to @samp{P}. For example, the call
+underscores, and asterisks changed to @samp{P}. If cross-compiling, the
+value @var{cross-size} is used if given, otherwise @code{configure}
+exits with an error message.
+
+For example, the call
@example
AC_CHECK_SIZEOF(int *)
@end example
The option's argument is available to the shell commands
@var{action-if-given} in the shell variable @code{withval}, which is
-actually just the value of the shell variable @code{with_@var{package}};
-you may use that variable instead, if you wish.
+actually just the value of the shell variable @code{with_@var{package}},
+with any @samp{-} characters changed into @samp{_}.
+You may use that variable instead, if you wish.
The argument @var{help-string} is a description of the option which
looks like this:
The option's argument is available to the shell commands
@var{action-if-given} in the shell variable @code{enableval}, which is
-actually just the value of the shell variable @code{enable_@var{package}};
-you may use that variable instead, if you wish.
-The @var{help-string} argument is like that of @code{AC_ARG_WITH}
+actually just the value of the shell variable
+@code{enable_@var{package}}, with any @samp{-} characters changed into
+@samp{_}. You may use that variable instead, if you wish. The
+@var{help-string} argument is like that of @code{AC_ARG_WITH}
(@pxref{External Software}).
@end defmac
echo "$types" | tr , \\012 | sort | uniq | while read ctype; do
test -z "$ctype" && continue
# Solaris 2.3 tr rejects noncontiguous characters in character classes.
- sym="`echo "${ctype}" | tr '[a-z] *' '[A-Z]_P'`"
+ sym="`echo "${ctype}" | tr 'abcdedfghijklmnopqrstuvwxyz *' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ_P'`"
echo "
/* The number of bytes in a ${ctype}. */
#undef SIZEOF_${sym}"
# /bin/sh on the Alpha gives `for' a random value if $funcs is empty.
if test -n "$funcs"; then
for func in `for x in $funcs; do echo $x; done | sort | uniq`; do
- sym="`echo ${func} | sed 's/[^a-zA-Z0-9_]/_/g' | tr '[a-z]' '[A-Z]'`"
+ sym="`echo ${func} | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdedfghijklmnopqrstuvwxyz' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ'`"
echo "
/* Define if you have the ${func} function. */
#undef HAVE_${sym}"
if test -n "$headers"; then
for header in `for x in $headers; do echo $x; done | sort | uniq`; do
- sym="`echo ${header} | sed 's/[^a-zA-Z0-9_]/_/g' | tr '[a-z]' '[A-Z]'`"
+ sym="`echo ${header} | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdedfghijklmnopqrstuvwxyz' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ'`"
echo "
/* Define if you have the <${header}> header file. */
#undef HAVE_${sym}"
if test -n "$libs"; then
for lib in `for x in $libs; do echo $x; done | sort | uniq`; do
- sym="`echo ${lib} | sed 's/[^a-zA-Z0-9_]/_/g' | tr '[a-z]' '[A-Z]'`"
+ sym="`echo ${lib} | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdedfghijklmnopqrstuvwxyz' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ'`"
echo "
/* Define if you have the ${lib} library (-l${lib}). */
#undef HAVE_LIB${sym}"
])
define([AC_CONFIG_HEADER], [#
-@@@config_h=$1@@@
+define([AC_CONFIG_H], patsubst($1, [ .*$], []))dnl
+@@@config_h=AC_CONFIG_H@@@
])
define([AC_DEFINE], [#
echo "$types" | tr , \\012 | sort | uniq | while read ctype; do
test -z "$ctype" && continue
# Solaris 2.3 tr rejects noncontiguous characters in character classes.
- sym="`echo "${ctype}" | tr '[a-z] *' '[A-Z]_P'`"
+ sym="`echo "${ctype}" | tr 'abcdedfghijklmnopqrstuvwxyz *' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ_P'`"
echo "
/* The number of bytes in a ${ctype}. */
#undef SIZEOF_${sym}"
# /bin/sh on the Alpha gives `for' a random value if $funcs is empty.
if test -n "$funcs"; then
for func in `for x in $funcs; do echo $x; done | sort | uniq`; do
- sym="`echo ${func} | sed 's/[^a-zA-Z0-9_]/_/g' | tr '[a-z]' '[A-Z]'`"
+ sym="`echo ${func} | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdedfghijklmnopqrstuvwxyz' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ'`"
echo "
/* Define if you have the ${func} function. */
#undef HAVE_${sym}"
if test -n "$headers"; then
for header in `for x in $headers; do echo $x; done | sort | uniq`; do
- sym="`echo ${header} | sed 's/[^a-zA-Z0-9_]/_/g' | tr '[a-z]' '[A-Z]'`"
+ sym="`echo ${header} | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdedfghijklmnopqrstuvwxyz' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ'`"
echo "
/* Define if you have the <${header}> header file. */
#undef HAVE_${sym}"
if test -n "$libs"; then
for lib in `for x in $libs; do echo $x; done | sort | uniq`; do
- sym="`echo ${lib} | sed 's/[^a-zA-Z0-9_]/_/g' | tr '[a-z]' '[A-Z]'`"
+ sym="`echo ${lib} | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdedfghijklmnopqrstuvwxyz' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ'`"
echo "
/* Define if you have the ${lib} library (-l${lib}). */
#undef HAVE_LIB${sym}"
echo "$types" | tr , \\012 | sort | uniq | while read ctype; do
test -z "$ctype" && continue
# Solaris 2.3 tr rejects noncontiguous characters in character classes.
- sym="`echo "${ctype}" | tr '[a-z] *' '[A-Z]_P'`"
+ sym="`echo "${ctype}" | tr 'abcdedfghijklmnopqrstuvwxyz *' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ_P'`"
echo "
/* The number of bytes in a ${ctype}. */
#undef SIZEOF_${sym}"
# /bin/sh on the Alpha gives `for' a random value if $funcs is empty.
if test -n "$funcs"; then
for func in `for x in $funcs; do echo $x; done | sort | uniq`; do
- sym="`echo ${func} | sed 's/[^a-zA-Z0-9_]/_/g' | tr '[a-z]' '[A-Z]'`"
+ sym="`echo ${func} | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdedfghijklmnopqrstuvwxyz' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ'`"
echo "
/* Define if you have the ${func} function. */
#undef HAVE_${sym}"
if test -n "$headers"; then
for header in `for x in $headers; do echo $x; done | sort | uniq`; do
- sym="`echo ${header} | sed 's/[^a-zA-Z0-9_]/_/g' | tr '[a-z]' '[A-Z]'`"
+ sym="`echo ${header} | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdedfghijklmnopqrstuvwxyz' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ'`"
echo "
/* Define if you have the <${header}> header file. */
#undef HAVE_${sym}"
if test -n "$libs"; then
for lib in `for x in $libs; do echo $x; done | sort | uniq`; do
- sym="`echo ${lib} | sed 's/[^a-zA-Z0-9_]/_/g' | tr '[a-z]' '[A-Z]'`"
+ sym="`echo ${lib} | sed 's/[^a-zA-Z0-9_]/_/g' | tr 'abcdedfghijklmnopqrstuvwxyz' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ'`"
echo "
/* Define if you have the ${lib} library (-l${lib}). */
#undef HAVE_LIB${sym}"
's,@''M4''@,$(M4),g' -e 's,@''AWK''@,$(AWK),g'
editpl = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''PERL''@,$(PERL),g'
-all: ${SCRIPTS}
+all: ${SCRIPTS} info
.SUFFIXES:
.SUFFIXES: .sh .pl
@c @setchapternewpage odd
@c %**end of header
-@set EDITION 2.4.1
-@set VERSION 2.4.1
-@set UPDATED June 1995
+@set EDITION 2.4.2
+@set VERSION 2.4.2
+@set UPDATED July 1995
@iftex
@finalout
whitespace-separated list of output files; it may be empty. This macro
creates each file @file{@var{file}} by copying an input file (by default
named @file{@var{file}.in}), substituting the output variable values.
+@c If the file would be unchanged, it is left untouched, to preserve its timestamp.
@xref{Makefile Substitutions}, for more information on using output variables.
@xref{Setting Output Variables}, for more information on creating them. This
macro creates the directory that the file is in if it doesn't exist (but
The @code{autoheader} program can create a template file of C
@samp{#define} statements for @code{configure} to use. If
@file{configure.in} invokes @code{AC_CONFIG_HEADER(@var{file})},
-@code{autoheader} creates @file{@var{file}.in}. Otherwise,
+@code{autoheader} creates @file{@var{file}.in}; if multiple file
+arguments are given, the first one is used. Otherwise,
@code{autoheader} creates @file{config.h.in}.
If you give @code{autoheader} an argument, it uses that file instead of
These macros are used to find programs not covered by the particular
test macros. If you need to check the behavior of a program as well as
-find out whether it is present, you have to write your own test for
-it (@pxref{Writing Tests}). If you need to check for a program that
-might not be in the user's @code{PATH}, you can temporarily add to it:
+find out whether it is present, you have to write your own test for it
+(@pxref{Writing Tests}). By default, these macros use the environment
+variable @code{PATH]. If you need to check for a program that might not
+be in the user's @code{PATH}, you can pass a modified path to use
+instead, like this:
@example
-ac_save_path="$PATH"
-PATH=/usr/libexec:/usr/sbin:/usr/etc:/etc:/usr/bin:/bin
-AC_PATH_PROG(INETD, inetd, /usr/libexec/inetd)
-PATH="$ac_save_path"
+AC_PATH_PROG(INETD, inetd, /usr/libexec/inetd,
+ $PATH:/usr/libexec:/usr/sbin:/usr/etc:etc)
@end example
-@noindent
-Keep @file{/usr/bin:/bin} in the @code{PATH} so if if the @code{echo} or
-@code{test} command is in one of those directories, @code{configure} can
-still find it.
-
-@defmac AC_CHECK_PROG (@var{variable}, @var{prog-to-check-for}, @var{value-if-found} @r{[}, @var{value-if-not-found}@r{]})
+@defmac AC_CHECK_PROG (@var{variable}, @var{prog-to-check-for}, @var{value-if-found} @r{[}, @var{value-if-not-found} @r{[}, @var{path}@r{]]})
@maindex CHECK_PROG
Check whether program @var{prog-to-check-for} exists in @code{PATH}. If
it is found, set @var{variable} to @var{value-if-found}, otherwise to
do nothing. Calls @code{AC_SUBST} for @var{variable}.
@end defmac
-@defmac AC_CHECK_PROGS (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found}@r{]})
+@defmac AC_CHECK_PROGS (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found} @r{[}, @var{path}@r{]]})
@maindex CHECK_PROGS
Check for each program in the whitespace-separated list
@var{progs-to-check-for} exists in @code{PATH}. If it is found, set
is not changed. Calls @code{AC_SUBST} for @var{variable}.
@end defmac
-@defmac AC_CHECK_TOOL (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found}@r{]})
+@defmac AC_CHECK_TOOL (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found} @r{[}, @var{path}@r{]]})
@maindex CHECK_TOOL
Like @code{AC_CHECK_PROG}, but first looks for @var{prog-to-check-for}
with a prefix of the host type as determined by @code{AC_CANONICAL_HOST},
or to @samp{:} if neither program exists.
@end defmac
-@defmac AC_PATH_PROG (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found}@r{]})
+@defmac AC_PATH_PROG (@var{variable}, @var{prog-to-check-for} @r{[}, @var{value-if-not-found} @r{[}, @var{path}@r{]]})
@maindex PATH_PROG
Like @code{AC_CHECK_PROG}, but set @var{variable} to the entire
path of @var{prog-to-check-for} if found.
@end defmac
-@defmac AC_PATH_PROGS (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found}@r{]})
+@defmac AC_PATH_PROGS (@var{variable}, @var{progs-to-check-for} @r{[}, @var{value-if-not-found} @r{[}, @var{path}@r{]]})
@maindex PATH_PROGS
Like @code{AC_CHECK_PROGS}, but if any of @var{progs-to-check-for}
are found, set @var{variable} to the entire path of the program
@defmac AC_FUNC_GETMNTENT
@maindex FUNC_GETMNTENT
@cvindex HAVE_GETMNTENT
-Check for @code{getmntent} in the @file{sun} and @file{seq}
-libraries, for Irix 4 and PTX, respectively. Then, if @code{getmntent} is
-available, define @code{HAVE_GETMNTENT}.
+Check for @code{getmntent} in the @file{sun}, @file{seq}, and @file{gen}
+libraries, for Irix 4, PTX, and Unixware, respectively. Then, if
+@code{getmntent} is available, define @code{HAVE_GETMNTENT}.
@end defmac
@defmac AC_FUNC_GETPGRP
that define @code{__STDC__} do not support @code{long double}.
@end defmac
-@defmac AC_CHECK_SIZEOF (@var{type})
+@defmac AC_CHECK_SIZEOF (@var{type} @r{[}, @var{cross-size}@r{]})
@maindex CHECK_SIZEOF
Define @code{SIZEOF_@var{uctype}} to be the size in bytes of the C (or
C++) builtin type @var{type}, e.g. @samp{int} or @samp{char *}. If
@samp{type} is unknown to the compiler, it gets a size of 0. @var{uctype}
is @var{type}, with lowercase converted to uppercase, spaces changed to
-underscores, and asterisks changed to @samp{P}. For example, the call
+underscores, and asterisks changed to @samp{P}. If cross-compiling, the
+value @var{cross-size} is used if given, otherwise @code{configure}
+exits with an error message.
+
+For example, the call
@example
AC_CHECK_SIZEOF(int *)
@end example
The option's argument is available to the shell commands
@var{action-if-given} in the shell variable @code{withval}, which is
-actually just the value of the shell variable @code{with_@var{package}};
-you may use that variable instead, if you wish.
+actually just the value of the shell variable @code{with_@var{package}},
+with any @samp{-} characters changed into @samp{_}.
+You may use that variable instead, if you wish.
The argument @var{help-string} is a description of the option which
looks like this:
The option's argument is available to the shell commands
@var{action-if-given} in the shell variable @code{enableval}, which is
-actually just the value of the shell variable @code{enable_@var{package}};
-you may use that variable instead, if you wish.
-The @var{help-string} argument is like that of @code{AC_ARG_WITH}
+actually just the value of the shell variable
+@code{enable_@var{package}}, with any @samp{-} characters changed into
+@samp{_}. You may use that variable instead, if you wish. The
+@var{help-string} argument is like that of @code{AC_ARG_WITH}
(@pxref{External Software}).
@end defmac
divert(-1)dnl Throw away output until AC_INIT is called.
changequote([, ])
-define(AC_ACVERSION, 2.4.1)
+define(AC_ACVERSION, 2.4.2)
dnl Some old m4's don't support m4exit. But they provide
dnl equivalent functionality by core dumping because of the
dnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND
-dnl [, VALUE-IF-NOT-FOUND])
+dnl [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(AC_CHECK_PROG,
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
ac_cv_prog_$1="[$]$1" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
+ for ac_dir in ifelse([$4], , $PATH, [$4]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_$1="$3"
AC_SUBST($1)dnl
])
-dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND])
+dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(AC_PATH_PROG,
[# Extract the first word of "$2", so it can be a program name with args.
set dummy $2; ac_word=[$]2
;;
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
+ for ac_dir in ifelse([$4], , $PATH, [$4]); do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_path_$1="$ac_dir/$ac_word"
AC_SUBST($1)dnl
])
-dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND])
+dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
+dnl [, PATH]])
AC_DEFUN(AC_CHECK_PROGS,
[for ac_prog in $2
do
-AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, )
+AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, , $4)
test -n "[$]$1" && break
done
ifelse([$3], , , [test -n "[$]$1" || $1="$3"
])])
-dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND])
+dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
+dnl [, PATH]])
AC_DEFUN(AC_PATH_PROGS,
[for ac_prog in $2
do
-AC_PATH_PROG($1, [$]ac_prog)
+AC_PATH_PROG($1, [$]ac_prog, , $4)
test -n "[$]$1" && break
done
ifelse([$3], , , [test -n "[$]$1" || $1="$3"
fi
])
-dnl AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND])
+dnl AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH]])
AC_DEFUN(AC_CHECK_TOOL,
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
- ifelse([$3], , [$2], ))
+ ifelse([$3], , [$2], ), $4)
ifelse([$3], , , [
if test -z "$ac_cv_prog_$1"; then
if test -n "$ac_tool_prefix"; then
AC_MSG_RESULT(yes)
ifelse([$3], ,
[changequote(, )dnl
- ac_tr_lib=HAVE_LIB`echo $1 | tr '[a-z]' '[A-Z]'`
+ ac_tr_lib=HAVE_LIB`echo $1 | tr 'abcdedfghijklmnopqrstuvwxyz' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ'`
changequote([, ])dnl
AC_DEFINE_UNQUOTED($ac_tr_lib)
LIBS="-l$1 $LIBS"
do
AC_CHECK_HEADER($ac_hdr,
[changequote(, )dnl
- ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
+ ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
changequote([, ])dnl
AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3)dnl
done
do
AC_CHECK_FUNC($ac_func,
[changequote(, )dnl
- ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
+ ac_tr_func=HAVE_`echo $ac_func | tr 'abcdedfghijklmnopqrstuvwxyz' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ'`
changequote([, ])dnl
AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl
done
dnl ### Checking compiler characteristics
-dnl AC_CHECK_SIZEOF(TYPE)
+dnl AC_CHECK_SIZEOF(TYPE [, CROSS-SIZE])
AC_DEFUN(AC_CHECK_SIZEOF,
[changequote(<<, >>)dnl
dnl The name to #define.
if (!f) exit(1);
fprintf(f, "%d\n", sizeof($1));
exit(0);
-}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0)])dnl
+}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
AC_MSG_RESULT($AC_CV_NAME)
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
undefine([AC_TYPE_NAME])dnl
ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g
])dnl
" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
+dnl This would break Makefile dependencies.
+dnl if cmp -s $ac_file conftest.out 2>/dev/null; then
+dnl echo "$ac_file is unchanged"
+dnl rm -f conftest.out
+dnl else
+dnl rm -f $ac_file
+dnl mv conftest.out $ac_file
+dnl fi
fi; done
rm -f conftest.subs
])
do
AC_CHECK_HEADER_DIRENT($ac_hdr,
[changequote(, )dnl
- ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
+ ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
changequote([, ])dnl
AC_DEFINE_UNQUOTED($ac_tr_hdr) $2])dnl
done])
[AC_TRY_RUN([#include <sys/types.h>
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
- ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])
+ ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
if test $ac_cv_func_closedir_void = yes; then
AC_DEFINE(VOID_CLOSEDIR)
fi
[AC_TRY_RUN([#include <sys/types.h>
#include <$ac_header_dirent>
int closedir(); main() { exit(closedir(opendir(".")) != 0); }],
- ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes)])
+ ac_cv_func_closedir_void=no, ac_cv_func_closedir_void=yes, ac_cv_func_closedir_void=yes)])
if test $ac_cv_func_closedir_void = yes; then
AC_DEFINE(CLOSEDIR_VOID)
fi
])
AC_DEFUN(AC_FUNC_GETMNTENT,
-[# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX.
+[# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware.
AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS",
- [AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS")])
+ [AC_CHECK_LIB(seq, getmntent, LIBS="-lseq $LIBS",
+ [AC_CHECK_LIB(gen, getmntent, LIBS="-lgen $LIBS")])])
AC_CHECK_FUNC(getmntent, [AC_DEFINE(HAVE_GETMNTENT)])])
AC_DEFUN(AC_FUNC_STRFTIME,