* acgeneral.m4: Prefer `>file' over `> file' etc.
* acspecific.m4: Likewise.
+1999-10-31 Akim Demaille <akim@epita.fr>
+
+ * acgeneral.m4: Prefer `>file' over `> file' etc.
+ * acspecific.m4: Likewise.
+
1999-10-31 Akim Demaille <akim@epita.fr>
Rename the family AC_NEED_DECL as AC_CHECK: it is more uniform,
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
changequote(, )dnl
- cat << \EOF
+ cat <<\EOF
`configure' configures software source code packages to adapt to many kinds
of systems.
run sed PROGRAM on installed program names
EOF
- cat << \EOF
+ cat <<\EOF
Host type:
--build=BUILD configure for building on BUILD [BUILD=HOST]
--host=HOST configure for HOST [guessed]
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+echo >confdefs.h
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
program_transform_name=
else
# Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
+ cat <<\EOF_SED >conftestsed
s,\\,\\\\,g; s,\$,$$,g
EOF_SED
program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
test -f "$cache_file" && . $cache_file
else
echo "creating cache $cache_file"
- > $cache_file
+ >$cache_file
fi
])
dnl AC_CACHE_SAVE()
define(AC_CACHE_SAVE,
-[cat > confcache <<\EOF
+[cat >confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
- esac >> confcache
+ esac >>confcache
changequote([, ])dnl
if cmp -s $cache_file confcache; then
:
else
if test -w $cache_file; then
echo "updating cache $cache_file"
- cat confcache > $cache_file
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
dnl and if VARIABLE is affected the same VALUE, do nothing, else
dnl die. The third argument is used by autoheader.
define(AC_DEFINE,
-[cat >> confdefs.h <<\EOF
+[cat >>confdefs.h <<\EOF
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
EOF
])
dnl -----------------------------------------------------
dnl Similar, but perform shell substitutions $ ` \ once on VALUE.
define(AC_DEFINE_UNQUOTED,
-[cat >> confdefs.h <<EOF
+[cat >>confdefs.h <<EOF
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
EOF
])
dnl `AC_TRY_COMPILER()', call `AC_LANG_*' to set-up for the right
dnl language.
AC_DEFUN(AC_TRY_COMPILER,
-[cat > conftest.$ac_ext << EOF
+[cat >conftest.$ac_ext <<EOF
ifelse(AC_LANG, [FORTRAN77], ,
[
[#]line __oline__ "configure"
dnl AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
AC_DEFUN(AC_TRY_CPP,
[AC_REQUIRE_CPP()dnl
-cat > conftest.$ac_ext <<EOF
+cat >conftest.$ac_ext <<EOF
[#]line __oline__ "configure"
#include "confdefs.h"
[$1]
dnl ACTION-IF-NOT-FOUND]])
AC_DEFUN(AC_EGREP_CPP,
[AC_REQUIRE_CPP()dnl
-cat > conftest.$ac_ext <<EOF
+cat >conftest.$ac_ext <<EOF
[#]line __oline__ "configure"
#include "confdefs.h"
[$2]
dnl AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
AC_DEFUN(AC_TRY_COMPILE,
-[cat > conftest.$ac_ext <<EOF
+[cat >conftest.$ac_ext <<EOF
ifelse(AC_LANG, [FORTRAN77],
[ program main
[$2]
dnl AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
AC_DEFUN(AC_TRY_LINK,
-[cat > conftest.$ac_ext <<EOF
+[cat >conftest.$ac_ext <<EOF
ifelse(AC_LANG, [FORTRAN77],
[
program main
dnl Like AC_TRY_RUN but assumes a native-environment (non-cross) compiler.
dnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
AC_DEFUN(AC_TRY_RUN_NATIVE,
-[cat > conftest.$ac_ext <<EOF
+[cat >conftest.$ac_ext <<EOF
[#]line __oline__ "configure"
#include "confdefs.h"
ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
dnl shells die. Unfortunately the limit is not known precisely...
define(AC_OUTPUT_CONFIG_STATUS,
[echo creating $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
+cat >$CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
dnl This checks if one of AC_LIST_HEADERS, AC_LIST_FILES, AC_CONFIG_COMMANDS,
dnl or AC_LIST_LINKS is set.
ifval(AC_LIST_HEADERS AC_LIST_LINKS AC_LIST_FILES AC_LIST_COMMANDS,
-[cat >> $CONFIG_STATUS <<EOF
+[cat >>$CONFIG_STATUS <<EOF
# If there were arguments and we reach this point, then the user
# has specified the files to intantiate. If there were no arguments,
# then the files were specified by envvars. Set only the envvar that
ifset([AC_LIST_COMMANDS],
[AC_OUTPUT_COMMANDS_COMMANDS()])dnl
-cat >> $CONFIG_STATUS <<EOF
+cat >>$CONFIG_STATUS <<EOF
undivert(AC_DIVERSION_ICMDS)dnl
EOF
-cat >> $CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\EOF
undivert(AC_DIVERSION_CMDS)dnl
exit 0
EOF
# If the first sed substitution is executed (which looks for macros that
# take arguments), then we branch to the cleanup section. Otherwise,
# look for a macro that doesn't take arguments.
-cat > $ac_cs_root.defs <<\EOF
+cat >$ac_cs_root.defs <<\EOF
changequote(<<, >>)dnl
s%^[ ]*<<#>>[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)%-D\1=\2%g
t cleanup
dnl the other too.
changequote(, )dnl
sed 's/%@/@@/; s/@%/@@/; s/%;t t\$/@;t t/; /@;t t\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@;t t\$/%;t t/' > \$ac_cs_root.subs <<\\CEOF
+ s/@@/%@/; s/@@/@%/; s/@;t t\$/%;t t/' >\$ac_cs_root.subs <<\\CEOF
changequote([, ])dnl
dnl These here document variables are unquoted when configure runs
dnl but quoted when config.status runs, so variables are expanded once.
EOF
-cat >> $CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\EOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
dnl One cannot portably go further than 100 commands because of HP-UX.
ac_sed_cmds=""
while $ac_more_lines; do
if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $ac_cs_root.subs > $ac_cs_root.sfrag
+ sed "1,${ac_beg}d; ${ac_end}q" $ac_cs_root.subs >$ac_cs_root.sfrag
else
- sed "${ac_end}q" $ac_cs_root.subs > $ac_cs_root.sfrag
+ sed "${ac_end}q" $ac_cs_root.subs >$ac_cs_root.sfrag
fi
if test ! -s $ac_cs_root.sfrag; then
ac_more_lines=false
# is no need to browse any of the substitutions).
# These are the two extra sed commands mentioned above.
(echo ':t
-/@@BKL@a-zA-Z_@BKR@@BKL@a-zA-Z_0-9@BKR@*@/!b' && cat $ac_cs_root.sfrag) > $ac_cs_root.s$ac_sed_frag
+/@@BKL@a-zA-Z_@BKR@@BKL@a-zA-Z_0-9@BKR@*@/!b' && cat $ac_cs_root.sfrag) >$ac_cs_root.s$ac_sed_frag
if test -z "$ac_sed_cmds"; then
ac_sed_cmds="sed -f $ac_cs_root.s$ac_sed_frag"
else
EOF
-cat >> $CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
changequote(, )dnl
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%;t t
])dnl
dnl The parens around the eval prevent an "illegal io" in Ultrix sh.
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_cs_root.out
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$ac_cs_root.out
dnl This would break Makefile dependencies.
dnl if cmp -s $ac_file $ac_cs_root.out 2>/dev/null; then
dnl echo "$ac_file is unchanged"
dnl purpose of `t clear; : clear'.
dnl
dnl Additionally, this works around a bug of IRIX' sed which does not
-dnl clear the `t' flag between to cycles.
-cat > $ac_cs_root.hdr <<\EOF
+dnl clear the `t' flag between two cycles.
+cat >$ac_cs_root.hdr <<\EOF
changequote(<<, >>)dnl
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
dnl It has to send itself into $CONFIG_STATUS (eg, via here documents).
dnl Upon exit, no here document shall be opened.
define(AC_OUTPUT_LINKS,
-[cat >> $CONFIG_STATUS <<\EOF
+[cat >>$CONFIG_STATUS <<\EOF
#
# CONFIG_LINKS section.
dnl It has to send itself into $CONFIG_STATUS (eg, via here documents).
dnl Upon exit, no here document shall be opened.
define(AC_OUTPUT_COMMANDS_COMMANDS,
-[cat >> $CONFIG_STATUS <<\EOF
+[cat >>$CONFIG_STATUS <<\EOF
#
# CONFIG_COMMANDS section.
echo "executing commands of $ac_dest"
case "$ac_dest" in
-AC_LIST_COMMANDS_COMMANDS[]dnl
+AC_LIST_COMMANDS_COMMANDS()dnl
esac
fi;done
EOF
AC_DEFUN(AC_PROG_CC_GNU,
[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat > conftest.c <<EOF
+cat >conftest.c <<EOF
#ifdef __GNUC__
yes;
#endif
AC_DEFUN(AC_PROG_CXX_GNU,
[AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx,
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat > conftest.C <<EOF
+cat >conftest.C <<EOF
#ifdef __GNUC__
yes;
#endif
dnl do CPP pre-processing.
AC_DEFUN(AC_PROG_F77_GNU,
[AC_CACHE_CHECK(whether we are using GNU Fortran 77, ac_cv_prog_g77,
-[cat > conftest.fpp <<EOF
+[cat >conftest.fpp <<EOF
#ifdef __GNUC__
yes
#endif
dnl ------------
AC_DEFUN(AC_PROG_CC_G,
[AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
-[echo 'void f(){}' > conftest.c
+[echo 'void f(){}' >conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac_cv_prog_cc_g=yes
else
dnl -------------
AC_DEFUN(AC_PROG_CXX_G,
[AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
-[echo 'void f(){}' > conftest.cc
+[echo 'void f(){}' >conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
ac_cv_prog_cxx_g=yes
else
dnl enable debugging.
AC_DEFUN(AC_PROG_F77_G,
[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
-[cat > conftest.f << EOF
+[cat >conftest.f <<EOF
program conftest
end
EOF
sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
changequote([, ])dnl
AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o,
-[echo 'foo(){}' > conftest.c
+[echo 'foo(){}' >conftest.c
# Make sure it works both with $CC and with simple cc.
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
changequote([, ])dnl
AC_CACHE_VAL(ac_cv_prog_f77_${ac_f77}_c_o,
-[cat > conftest.f << EOF
+[cat >conftest.f <<EOF
program conftest
end
EOF
[AC_MSG_CHECKING(whether ${MAKE-make} sets \${MAKE})
set dummy ${MAKE-make}; ac_make=`echo "[$]2" | sed 'y%./+-%__p_%'`
AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,
-[cat > conftestmake <<\EOF
+[cat >conftestmake <<\EOF
all:
@echo 'ac_maketemp="${MAKE}"'
EOF
AC_DEFUN(AC_FUNC_UTIME_NULL,
[AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null,
-[rm -f conftestdata; > conftestdata
+[rm -f conftestdata; >conftestdata
# Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
AC_TRY_RUN([#include <sys/types.h>
#include <sys/stat.h>
dnl Checks if `#' can be used to glue strings together at the CPP level.
dnl Defines HAVE_STRINGIZE if positive.
AC_DEFUN(AC_C_STRINGIZE,
-[AC_REQUIRE([AC_PROG_CPP])
+[AC_REQUIRE([AC_PROG_CPP])dnl
AC_MSG_CHECKING([for preprocessor stringizing operator])
AC_CACHE_VAL(ac_cv_c_stringize,
AC_EGREP_CPP([#teststring],[
[AC_MSG_CHECKING([for object suffix])
AC_CACHE_VAL(ac_cv_objext,
[rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
+echo 'int i = 1;' >conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
for ac_file in conftest.*; do
case $ac_file in
AC_CACHE_CHECK([for Fortran 77 libraries],
ac_cv_flibs,
[
- AC_REQUIRE([AC_PROG_F77])
- AC_REQUIRE([AC_CYGWIN])
+ AC_REQUIRE([AC_PROG_F77])dnl
+ AC_REQUIRE([AC_CYGWIN])dnl
AC_LANG_SAVE
AC_LANG_FORTRAN77
# This is the simplest of all Fortran 77 programs.
- cat > conftest.$ac_ext <<EOF
+ cat >conftest.$ac_ext <<EOF
end
EOF
changequote(, )dnl
# If we are using xlf then replace all the commas with spaces.
- if test `echo $f77_link_output | grep xlfentry > /dev/null 2>&1`; then
+ if test `echo $f77_link_output | grep xlfentry >/dev/null 2>&1`; then
f77_link_output=`echo $f77_link_output | sed 's/,/ /g'`
fi
AC_CACHE_CHECK([for Fortran 77 name-mangling scheme],
ac_cv_f77_mangling,
[
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_PROG_F77])
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_PROG_F77])dnl
AC_LANG_SAVE
AC_LANG_FORTRAN77
-cat > conftest.$ac_ext <<EOF
+cat >conftest.$ac_ext <<EOF
subroutine foobar()
return
end
dnl Be optimistic at first.
ac_cv_f77_wrappers="yes"
- AC_REQUIRE([AC_F77_NAME_MANGLING])
+ AC_REQUIRE([AC_F77_NAME_MANGLING])dnl
case "$f77_case" in
lower)
case "$f77_underscore" in
AC_CACHE_CHECK($ac_msg, ac_cv_sys_interpreter,
[echo '#! /bin/cat
exit 69
-' > conftest
+' >conftest
chmod u+x conftest
(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null)
if test $? -ne 69; then
for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
test -d $ac_dir || continue
test -w $ac_dir || continue # It is less confusing to not echo anything here.
- (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
- (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
+ (echo 1 >$ac_dir/conftest9012345) 2>/dev/null
+ (echo 2 >$ac_dir/conftest9012346) 2>/dev/null
val=`cat $ac_dir/conftest9012345 2>/dev/null`
if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
ac_cv_sys_long_file_names=no
if mkdir conftestdir; then
cd conftestdir
# Make sure to not put "make" in the Imakefile rules, since we grep it out.
- cat > Imakefile <<'EOF'
+ cat >Imakefile <<'EOF'
acfindx:
@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
EOF
EMXOS2=
test "$ac_cv_emxos2" = yes && EMXOS2=yes])
+
+dnl AC_EXEEXT
+dnl ---------
dnl Check for the extension used for executables. This knows that we
dnl add .exe for Cygwin or mingw32. Otherwise, it compiles a test
dnl executable. If this is called, the executable extensions will be
dnl automatically used by link commands run by the configure script.
AC_DEFUN(AC_EXEEXT,
-[AC_REQUIRE([AC_CYGWIN])
-AC_REQUIRE([AC_MINGW32])
-AC_REQUIRE([AC_EMXOS2])
+[AC_REQUIRE([AC_CYGWIN])dnl
+AC_REQUIRE([AC_MINGW32])dnl
+AC_REQUIRE([AC_EMXOS2])dnl
AC_MSG_CHECKING([for executable suffix])
AC_CACHE_VAL(ac_cv_exeext,
[if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
ac_cv_exeext=.exe
else
rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
+ echo 'int main () { return 0; }' >conftest.$ac_ext
ac_cv_exeext=
if AC_TRY_EVAL(ac_link); then
for file in conftest.*; do
AC_MSG_RESULT(${ac_cv_exeext})
dnl Setting ac_exeext will implicitly change the ac_link command.
ac_exeext=$EXEEXT
-AC_SUBST(EXEEXT)])
+AC_SUBST(EXEEXT)dnl
+])dnl AC_EXEEXT
dnl ### Checks for UNIX variants
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
changequote(, )dnl
- cat << \EOF
+ cat <<\EOF
`configure' configures software source code packages to adapt to many kinds
of systems.
run sed PROGRAM on installed program names
EOF
- cat << \EOF
+ cat <<\EOF
Host type:
--build=BUILD configure for building on BUILD [BUILD=HOST]
--host=HOST configure for HOST [guessed]
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+echo >confdefs.h
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
program_transform_name=
else
# Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
+ cat <<\EOF_SED >conftestsed
s,\\,\\\\,g; s,\$,$$,g
EOF_SED
program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
test -f "$cache_file" && . $cache_file
else
echo "creating cache $cache_file"
- > $cache_file
+ >$cache_file
fi
])
dnl AC_CACHE_SAVE()
define(AC_CACHE_SAVE,
-[cat > confcache <<\EOF
+[cat >confcache <<\EOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
# scripts and configure runs. It is not useful on other systems.
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
- esac >> confcache
+ esac >>confcache
changequote([, ])dnl
if cmp -s $cache_file confcache; then
:
else
if test -w $cache_file; then
echo "updating cache $cache_file"
- cat confcache > $cache_file
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
dnl and if VARIABLE is affected the same VALUE, do nothing, else
dnl die. The third argument is used by autoheader.
define(AC_DEFINE,
-[cat >> confdefs.h <<\EOF
+[cat >>confdefs.h <<\EOF
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
EOF
])
dnl -----------------------------------------------------
dnl Similar, but perform shell substitutions $ ` \ once on VALUE.
define(AC_DEFINE_UNQUOTED,
-[cat >> confdefs.h <<EOF
+[cat >>confdefs.h <<EOF
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
EOF
])
dnl `AC_TRY_COMPILER()', call `AC_LANG_*' to set-up for the right
dnl language.
AC_DEFUN(AC_TRY_COMPILER,
-[cat > conftest.$ac_ext << EOF
+[cat >conftest.$ac_ext <<EOF
ifelse(AC_LANG, [FORTRAN77], ,
[
[#]line __oline__ "configure"
dnl AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
AC_DEFUN(AC_TRY_CPP,
[AC_REQUIRE_CPP()dnl
-cat > conftest.$ac_ext <<EOF
+cat >conftest.$ac_ext <<EOF
[#]line __oline__ "configure"
#include "confdefs.h"
[$1]
dnl ACTION-IF-NOT-FOUND]])
AC_DEFUN(AC_EGREP_CPP,
[AC_REQUIRE_CPP()dnl
-cat > conftest.$ac_ext <<EOF
+cat >conftest.$ac_ext <<EOF
[#]line __oline__ "configure"
#include "confdefs.h"
[$2]
dnl AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
AC_DEFUN(AC_TRY_COMPILE,
-[cat > conftest.$ac_ext <<EOF
+[cat >conftest.$ac_ext <<EOF
ifelse(AC_LANG, [FORTRAN77],
[ program main
[$2]
dnl AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
AC_DEFUN(AC_TRY_LINK,
-[cat > conftest.$ac_ext <<EOF
+[cat >conftest.$ac_ext <<EOF
ifelse(AC_LANG, [FORTRAN77],
[
program main
dnl Like AC_TRY_RUN but assumes a native-environment (non-cross) compiler.
dnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
AC_DEFUN(AC_TRY_RUN_NATIVE,
-[cat > conftest.$ac_ext <<EOF
+[cat >conftest.$ac_ext <<EOF
[#]line __oline__ "configure"
#include "confdefs.h"
ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
dnl shells die. Unfortunately the limit is not known precisely...
define(AC_OUTPUT_CONFIG_STATUS,
[echo creating $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
+cat >$CONFIG_STATUS <<EOF
#! /bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
dnl This checks if one of AC_LIST_HEADERS, AC_LIST_FILES, AC_CONFIG_COMMANDS,
dnl or AC_LIST_LINKS is set.
ifval(AC_LIST_HEADERS AC_LIST_LINKS AC_LIST_FILES AC_LIST_COMMANDS,
-[cat >> $CONFIG_STATUS <<EOF
+[cat >>$CONFIG_STATUS <<EOF
# If there were arguments and we reach this point, then the user
# has specified the files to intantiate. If there were no arguments,
# then the files were specified by envvars. Set only the envvar that
ifset([AC_LIST_COMMANDS],
[AC_OUTPUT_COMMANDS_COMMANDS()])dnl
-cat >> $CONFIG_STATUS <<EOF
+cat >>$CONFIG_STATUS <<EOF
undivert(AC_DIVERSION_ICMDS)dnl
EOF
-cat >> $CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\EOF
undivert(AC_DIVERSION_CMDS)dnl
exit 0
EOF
# If the first sed substitution is executed (which looks for macros that
# take arguments), then we branch to the cleanup section. Otherwise,
# look for a macro that doesn't take arguments.
-cat > $ac_cs_root.defs <<\EOF
+cat >$ac_cs_root.defs <<\EOF
changequote(<<, >>)dnl
s%^[ ]*<<#>>[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)%-D\1=\2%g
t cleanup
dnl the other too.
changequote(, )dnl
sed 's/%@/@@/; s/@%/@@/; s/%;t t\$/@;t t/; /@;t t\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@;t t\$/%;t t/' > \$ac_cs_root.subs <<\\CEOF
+ s/@@/%@/; s/@@/@%/; s/@;t t\$/%;t t/' >\$ac_cs_root.subs <<\\CEOF
changequote([, ])dnl
dnl These here document variables are unquoted when configure runs
dnl but quoted when config.status runs, so variables are expanded once.
EOF
-cat >> $CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\EOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
dnl One cannot portably go further than 100 commands because of HP-UX.
ac_sed_cmds=""
while $ac_more_lines; do
if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $ac_cs_root.subs > $ac_cs_root.sfrag
+ sed "1,${ac_beg}d; ${ac_end}q" $ac_cs_root.subs >$ac_cs_root.sfrag
else
- sed "${ac_end}q" $ac_cs_root.subs > $ac_cs_root.sfrag
+ sed "${ac_end}q" $ac_cs_root.subs >$ac_cs_root.sfrag
fi
if test ! -s $ac_cs_root.sfrag; then
ac_more_lines=false
# is no need to browse any of the substitutions).
# These are the two extra sed commands mentioned above.
(echo ':t
-/@@BKL@a-zA-Z_@BKR@@BKL@a-zA-Z_0-9@BKR@*@/!b' && cat $ac_cs_root.sfrag) > $ac_cs_root.s$ac_sed_frag
+/@@BKL@a-zA-Z_@BKR@@BKL@a-zA-Z_0-9@BKR@*@/!b' && cat $ac_cs_root.sfrag) >$ac_cs_root.s$ac_sed_frag
if test -z "$ac_sed_cmds"; then
ac_sed_cmds="sed -f $ac_cs_root.s$ac_sed_frag"
else
EOF
-cat >> $CONFIG_STATUS <<\EOF
+cat >>$CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
changequote(, )dnl
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%;t t
])dnl
dnl The parens around the eval prevent an "illegal io" in Ultrix sh.
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_cs_root.out
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$ac_cs_root.out
dnl This would break Makefile dependencies.
dnl if cmp -s $ac_file $ac_cs_root.out 2>/dev/null; then
dnl echo "$ac_file is unchanged"
dnl purpose of `t clear; : clear'.
dnl
dnl Additionally, this works around a bug of IRIX' sed which does not
-dnl clear the `t' flag between to cycles.
-cat > $ac_cs_root.hdr <<\EOF
+dnl clear the `t' flag between two cycles.
+cat >$ac_cs_root.hdr <<\EOF
changequote(<<, >>)dnl
s/[\\&%]/\\&/g
s%[\\$`]%\\&%g
dnl It has to send itself into $CONFIG_STATUS (eg, via here documents).
dnl Upon exit, no here document shall be opened.
define(AC_OUTPUT_LINKS,
-[cat >> $CONFIG_STATUS <<\EOF
+[cat >>$CONFIG_STATUS <<\EOF
#
# CONFIG_LINKS section.
dnl It has to send itself into $CONFIG_STATUS (eg, via here documents).
dnl Upon exit, no here document shall be opened.
define(AC_OUTPUT_COMMANDS_COMMANDS,
-[cat >> $CONFIG_STATUS <<\EOF
+[cat >>$CONFIG_STATUS <<\EOF
#
# CONFIG_COMMANDS section.
echo "executing commands of $ac_dest"
case "$ac_dest" in
-AC_LIST_COMMANDS_COMMANDS[]dnl
+AC_LIST_COMMANDS_COMMANDS()dnl
esac
fi;done
EOF
AC_DEFUN(AC_PROG_CC_GNU,
[AC_CACHE_CHECK(whether we are using GNU C, ac_cv_prog_gcc,
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat > conftest.c <<EOF
+cat >conftest.c <<EOF
#ifdef __GNUC__
yes;
#endif
AC_DEFUN(AC_PROG_CXX_GNU,
[AC_CACHE_CHECK(whether we are using GNU C++, ac_cv_prog_gxx,
[dnl The semicolon is to pacify NeXT's syntax-checking cpp.
-cat > conftest.C <<EOF
+cat >conftest.C <<EOF
#ifdef __GNUC__
yes;
#endif
dnl do CPP pre-processing.
AC_DEFUN(AC_PROG_F77_GNU,
[AC_CACHE_CHECK(whether we are using GNU Fortran 77, ac_cv_prog_g77,
-[cat > conftest.fpp <<EOF
+[cat >conftest.fpp <<EOF
#ifdef __GNUC__
yes
#endif
dnl ------------
AC_DEFUN(AC_PROG_CC_G,
[AC_CACHE_CHECK(whether ${CC-cc} accepts -g, ac_cv_prog_cc_g,
-[echo 'void f(){}' > conftest.c
+[echo 'void f(){}' >conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
ac_cv_prog_cc_g=yes
else
dnl -------------
AC_DEFUN(AC_PROG_CXX_G,
[AC_CACHE_CHECK(whether ${CXX-g++} accepts -g, ac_cv_prog_cxx_g,
-[echo 'void f(){}' > conftest.cc
+[echo 'void f(){}' >conftest.cc
if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
ac_cv_prog_cxx_g=yes
else
dnl enable debugging.
AC_DEFUN(AC_PROG_F77_G,
[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g,
-[cat > conftest.f << EOF
+[cat >conftest.f <<EOF
program conftest
end
EOF
sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
changequote([, ])dnl
AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o,
-[echo 'foo(){}' > conftest.c
+[echo 'foo(){}' >conftest.c
# Make sure it works both with $CC and with simple cc.
# We do the test twice because some compilers refuse to overwrite an
# existing .o file with -o, though they will create one.
sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`"
changequote([, ])dnl
AC_CACHE_VAL(ac_cv_prog_f77_${ac_f77}_c_o,
-[cat > conftest.f << EOF
+[cat >conftest.f <<EOF
program conftest
end
EOF
[AC_MSG_CHECKING(whether ${MAKE-make} sets \${MAKE})
set dummy ${MAKE-make}; ac_make=`echo "[$]2" | sed 'y%./+-%__p_%'`
AC_CACHE_VAL(ac_cv_prog_make_${ac_make}_set,
-[cat > conftestmake <<\EOF
+[cat >conftestmake <<\EOF
all:
@echo 'ac_maketemp="${MAKE}"'
EOF
AC_DEFUN(AC_FUNC_UTIME_NULL,
[AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null,
-[rm -f conftestdata; > conftestdata
+[rm -f conftestdata; >conftestdata
# Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
AC_TRY_RUN([#include <sys/types.h>
#include <sys/stat.h>
dnl Checks if `#' can be used to glue strings together at the CPP level.
dnl Defines HAVE_STRINGIZE if positive.
AC_DEFUN(AC_C_STRINGIZE,
-[AC_REQUIRE([AC_PROG_CPP])
+[AC_REQUIRE([AC_PROG_CPP])dnl
AC_MSG_CHECKING([for preprocessor stringizing operator])
AC_CACHE_VAL(ac_cv_c_stringize,
AC_EGREP_CPP([#teststring],[
[AC_MSG_CHECKING([for object suffix])
AC_CACHE_VAL(ac_cv_objext,
[rm -f conftest*
-echo 'int i = 1;' > conftest.$ac_ext
+echo 'int i = 1;' >conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
for ac_file in conftest.*; do
case $ac_file in
AC_CACHE_CHECK([for Fortran 77 libraries],
ac_cv_flibs,
[
- AC_REQUIRE([AC_PROG_F77])
- AC_REQUIRE([AC_CYGWIN])
+ AC_REQUIRE([AC_PROG_F77])dnl
+ AC_REQUIRE([AC_CYGWIN])dnl
AC_LANG_SAVE
AC_LANG_FORTRAN77
# This is the simplest of all Fortran 77 programs.
- cat > conftest.$ac_ext <<EOF
+ cat >conftest.$ac_ext <<EOF
end
EOF
changequote(, )dnl
# If we are using xlf then replace all the commas with spaces.
- if test `echo $f77_link_output | grep xlfentry > /dev/null 2>&1`; then
+ if test `echo $f77_link_output | grep xlfentry >/dev/null 2>&1`; then
f77_link_output=`echo $f77_link_output | sed 's/,/ /g'`
fi
AC_CACHE_CHECK([for Fortran 77 name-mangling scheme],
ac_cv_f77_mangling,
[
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_PROG_F77])
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_PROG_F77])dnl
AC_LANG_SAVE
AC_LANG_FORTRAN77
-cat > conftest.$ac_ext <<EOF
+cat >conftest.$ac_ext <<EOF
subroutine foobar()
return
end
dnl Be optimistic at first.
ac_cv_f77_wrappers="yes"
- AC_REQUIRE([AC_F77_NAME_MANGLING])
+ AC_REQUIRE([AC_F77_NAME_MANGLING])dnl
case "$f77_case" in
lower)
case "$f77_underscore" in
AC_CACHE_CHECK($ac_msg, ac_cv_sys_interpreter,
[echo '#! /bin/cat
exit 69
-' > conftest
+' >conftest
chmod u+x conftest
(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null)
if test $? -ne 69; then
for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
test -d $ac_dir || continue
test -w $ac_dir || continue # It is less confusing to not echo anything here.
- (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
- (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
+ (echo 1 >$ac_dir/conftest9012345) 2>/dev/null
+ (echo 2 >$ac_dir/conftest9012346) 2>/dev/null
val=`cat $ac_dir/conftest9012345 2>/dev/null`
if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
ac_cv_sys_long_file_names=no
if mkdir conftestdir; then
cd conftestdir
# Make sure to not put "make" in the Imakefile rules, since we grep it out.
- cat > Imakefile <<'EOF'
+ cat >Imakefile <<'EOF'
acfindx:
@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
EOF
EMXOS2=
test "$ac_cv_emxos2" = yes && EMXOS2=yes])
+
+dnl AC_EXEEXT
+dnl ---------
dnl Check for the extension used for executables. This knows that we
dnl add .exe for Cygwin or mingw32. Otherwise, it compiles a test
dnl executable. If this is called, the executable extensions will be
dnl automatically used by link commands run by the configure script.
AC_DEFUN(AC_EXEEXT,
-[AC_REQUIRE([AC_CYGWIN])
-AC_REQUIRE([AC_MINGW32])
-AC_REQUIRE([AC_EMXOS2])
+[AC_REQUIRE([AC_CYGWIN])dnl
+AC_REQUIRE([AC_MINGW32])dnl
+AC_REQUIRE([AC_EMXOS2])dnl
AC_MSG_CHECKING([for executable suffix])
AC_CACHE_VAL(ac_cv_exeext,
[if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
ac_cv_exeext=.exe
else
rm -f conftest*
- echo 'int main () { return 0; }' > conftest.$ac_ext
+ echo 'int main () { return 0; }' >conftest.$ac_ext
ac_cv_exeext=
if AC_TRY_EVAL(ac_link); then
for file in conftest.*; do
AC_MSG_RESULT(${ac_cv_exeext})
dnl Setting ac_exeext will implicitly change the ac_link command.
ac_exeext=$EXEEXT
-AC_SUBST(EXEEXT)])
+AC_SUBST(EXEEXT)dnl
+])dnl AC_EXEEXT
dnl ### Checks for UNIX variants