Whitespace cleanup.

* lib/autoconf/fortran.m4: Consistently use tabs.

Signed-off-by: Eric Blake <ebb9@byu.net>
This commit is contained in:
Eric Blake 2008-10-23 19:58:40 -06:00
parent 3f38aadc7c
commit 58a97ecfca
2 changed files with 99 additions and 94 deletions

View File

@ -1,3 +1,8 @@
2008-10-23 Eric Blake <ebb9@byu.net>
Whitespace cleanup.
* lib/autoconf/fortran.m4: Consistently use tabs.
2008-10-23 Chikama Masaki <masaki.chikama@gmail.com> (tiny change)
For gfortran on sh, ignore -little.

View File

@ -190,7 +190,7 @@ AU_DEFUN([AC_LANG_FORTRAN77], [AC_LANG(Fortran 77)])
m4_defun([_AC_FORTRAN_ASSERT],
[m4_if(_AC_LANG, [Fortran], [],
[m4_if(_AC_LANG, [Fortran 77], [],
[m4_fatal([$0: current language is not Fortran: ] _AC_LANG)])])])
[m4_fatal([$0: current language is not Fortran: ] _AC_LANG)])])])
# _AC_LANG_ABBREV(Fortran 77)
@ -217,7 +217,7 @@ m4_define([_AC_LANG_PREFIX(Fortran)], [FC])
AC_DEFUN([_AC_FC],
[_AC_FORTRAN_ASSERT()dnl
AC_LANG_CASE([Fortran 77], [F77],
[Fortran], [FC])])
[Fortran], [FC])])
@ -294,7 +294,7 @@ AC_DEFUN([AC_LANG_PREPROC(Fortran 77)],
# Find the Fortran preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able.
AC_DEFUN([AC_LANG_PREPROC(Fortran)],
[m4_warn([syntax],
[$0: No preprocessor defined for ]_AC_LANG)])
[$0: No preprocessor defined for ]_AC_LANG)])
# AC_LANG_COMPILER(Fortran 77)
@ -331,8 +331,8 @@ AC_DEFUN([_AC_FC_DIALECT_YEAR],
[90],[1990], [1990],[1990],
[95],[1995], [1995],[1995],
[2000],[2000],
[],[],
[m4_fatal([unknown Fortran dialect])])])
[],[],
[m4_fatal([unknown Fortran dialect])])])
# _AC_PROG_FC([DIALECT], [COMPILERS...])
@ -482,7 +482,7 @@ fi[]dnl
AC_DEFUN([_AC_PROG_FC_C_O],
[_AC_FORTRAN_ASSERT()dnl
AC_CACHE_CHECK([whether $[]_AC_FC[] understands -c and -o together],
[ac_cv_prog_[]_AC_LANG_ABBREV[]_c_o],
[ac_cv_prog_[]_AC_LANG_ABBREV[]_c_o],
[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
# We test twice because some compilers refuse to overwrite an existing
# `.o' file with `-o', although they will create one.
@ -498,8 +498,8 @@ fi
rm -f conftest*])
if test $ac_cv_prog_[]_AC_LANG_ABBREV[]_c_o = no; then
AC_DEFINE([]_AC_FC[]_NO_MINUS_C_MINUS_O, 1,
[Define to 1 if your Fortran compiler doesn't accept
-c and -o together.])
[Define to 1 if your Fortran compiler doesn't accept
-c and -o together.])
fi
])# _AC_PROG_FC_C_O
@ -585,9 +585,9 @@ case $ac_[]_AC_LANG_ABBREV[]_v_output in
# Doubly-quoted arguments were reported for "PGF90/x86 Linux/x86 5.0-2".
*-cmdline\ * | *-ignore\ * | *-def\ *)
ac_[]_AC_LANG_ABBREV[]_v_output=`echo $ac_[]_AC_LANG_ABBREV[]_v_output | sed "\
s/-cmdline *'[[^']]*'/ /g; s/-cmdline *\"[[^\"]]*\"/ /g
s/-ignore *'[[^']]*'/ /g; s/-ignore *\"[[^\"]]*\"/ /g
s/-def *'[[^']]*'/ /g; s/-def *\"[[^\"]]*\"/ /g"` ;;
s/-cmdline *'[[^']]*'/ /g; s/-cmdline *\"[[^\"]]*\"/ /g
s/-ignore *'[[^']]*'/ /g; s/-ignore *\"[[^\"]]*\"/ /g
s/-def *'[[^']]*'/ /g; s/-def *\"[[^\"]]*\"/ /g"` ;;
# If we are using Cray Fortran then delete quotes.
*cft90*)
@ -607,7 +607,7 @@ esac
AC_DEFUN([_AC_PROG_FC_V],
[_AC_FORTRAN_ASSERT()dnl
AC_CACHE_CHECK([how to get verbose linking output from $[]_AC_FC[]],
[ac_cv_prog_[]_AC_LANG_ABBREV[]_v],
[ac_cv_prog_[]_AC_LANG_ABBREV[]_v],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
[ac_cv_prog_[]_AC_LANG_ABBREV[]_v=
# Try some options frequently used verbose output
@ -616,16 +616,16 @@ for ac_verb in -v -verbose --verbose -V -\#\#\#; do
# look for -l* and *.a constructs in the output
for ac_arg in $ac_[]_AC_LANG_ABBREV[]_v_output; do
case $ac_arg in
[[\\/]]*.a | ?:[[\\/]]*.a | -[[lLRu]]*)
ac_cv_prog_[]_AC_LANG_ABBREV[]_v=$ac_verb
break 2 ;;
[[\\/]]*.a | ?:[[\\/]]*.a | -[[lLRu]]*)
ac_cv_prog_[]_AC_LANG_ABBREV[]_v=$ac_verb
break 2 ;;
esac
done
done
if test -z "$ac_cv_prog_[]_AC_LANG_ABBREV[]_v"; then
AC_MSG_WARN([cannot determine how to obtain linking information from $[]_AC_FC[]])
fi],
[AC_MSG_WARN([compilation failed])])
[AC_MSG_WARN([compilation failed])])
])])# _AC_PROG_FC_V
@ -677,25 +677,25 @@ while test $[@%:@] != 1; do
shift
ac_arg=$[1]
case $ac_arg in
[[\\/]]*.a | ?:[[\\/]]*.a)
_AC_LIST_MEMBER_IF($ac_arg, $ac_cv_[]_AC_LANG_ABBREV[]_libs, ,
ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_arg")
;;
-bI:*)
_AC_LIST_MEMBER_IF($ac_arg, $ac_cv_[]_AC_LANG_ABBREV[]_libs, ,
[_AC_LINKER_OPTION([$ac_arg], ac_cv_[]_AC_LANG_ABBREV[]_libs)])
;;
# Ignore these flags.
-lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \
[[\\/]]*.a | ?:[[\\/]]*.a)
_AC_LIST_MEMBER_IF($ac_arg, $ac_cv_[]_AC_LANG_ABBREV[]_libs, ,
ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_arg")
;;
-bI:*)
_AC_LIST_MEMBER_IF($ac_arg, $ac_cv_[]_AC_LANG_ABBREV[]_libs, ,
[_AC_LINKER_OPTION([$ac_arg], ac_cv_[]_AC_LANG_ABBREV[]_libs)])
;;
# Ignore these flags.
-lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -little \
|-LANG:=* | -LIST:* | -LNO:*)
;;
-lkernel32)
test x"$CYGWIN" != xyes && ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_arg"
;;
-[[LRuYz]])
# These flags, when seen by themselves, take an argument.
# We remove the space between option and argument and re-iterate
# unless we find an empty arg or a new option (starting with -)
;;
-lkernel32)
test x"$CYGWIN" != xyes && ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_arg"
;;
-[[LRuYz]])
# These flags, when seen by themselves, take an argument.
# We remove the space between option and argument and re-iterate
# unless we find an empty arg or a new option (starting with -)
case $[2] in
"" | -*);;
*)
@ -704,22 +704,22 @@ while test $[@%:@] != 1; do
set X $ac_arg "$[@]"
;;
esac
;;
-YP,*)
for ac_j in `AS_ECHO(["$ac_arg"]) | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
_AC_LIST_MEMBER_IF($ac_j, $ac_cv_[]_AC_LANG_ABBREV[]_libs, ,
[ac_arg="$ac_arg $ac_j"
ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_j"])
done
;;
-[[lLR]]*)
_AC_LIST_MEMBER_IF($ac_arg, $ac_cv_[]_AC_LANG_ABBREV[]_libs, ,
ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_arg")
;;
;;
-YP,*)
for ac_j in `AS_ECHO(["$ac_arg"]) | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
_AC_LIST_MEMBER_IF($ac_j, $ac_cv_[]_AC_LANG_ABBREV[]_libs, ,
[ac_arg="$ac_arg $ac_j"
ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_j"])
done
;;
-[[lLR]]*)
_AC_LIST_MEMBER_IF($ac_arg, $ac_cv_[]_AC_LANG_ABBREV[]_libs, ,
ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_arg")
;;
-zallextract*| -zdefaultextract)
ac_cv_[]_AC_LANG_ABBREV[]_libs="$ac_cv_[]_AC_LANG_ABBREV[]_libs $ac_arg"
;;
# Ignore everything else.
# Ignore everything else.
esac
done
# restore positional arguments
@ -731,9 +731,9 @@ set X $ac_save_positional; shift
case `(uname -sr) 2>/dev/null` in
"SunOS 5"*)
ac_ld_run_path=`AS_ECHO(["$ac_[]_AC_LANG_ABBREV[]_v_output"]) |
sed -n 's,^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$,-R\1,p'`
sed -n 's,^.*LD_RUN_PATH *= *\(/[[^ ]]*\).*$,-R\1,p'`
test "x$ac_ld_run_path" != x &&
_AC_LINKER_OPTION([$ac_ld_run_path], ac_cv_[]_AC_LANG_ABBREV[]_libs)
_AC_LINKER_OPTION([$ac_ld_run_path], ac_cv_[]_AC_LANG_ABBREV[]_libs)
;;
esac
fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x"
@ -810,7 +810,7 @@ m4_define(_AC_LANG_PROGRAM_C_[]_AC_FC[]_HOOKS,
[#endif
])
AC_CACHE_CHECK([for dummy main to link with _AC_LANG libraries],
ac_cv_[]_AC_LANG_ABBREV[]_dummy_main,
ac_cv_[]_AC_LANG_ABBREV[]_dummy_main,
[ac_[]_AC_LANG_ABBREV[]_dm_save_LIBS=$LIBS
LIBS="$LIBS $[]_AC_LANG_PREFIX[]LIBS"
ac_fortran_dm_var=[]_AC_FC[]_DUMMY_MAIN
@ -818,13 +818,13 @@ AC_CACHE_CHECK([for dummy main to link with _AC_LANG libraries],
# First, try linking without a dummy main:
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
[ac_cv_fortran_dummy_main=none],
[ac_cv_fortran_dummy_main=unknown])
[ac_cv_fortran_dummy_main=none],
[ac_cv_fortran_dummy_main=unknown])
if test $ac_cv_fortran_dummy_main = unknown; then
for ac_func in MAIN__ MAIN_ __main MAIN _MAIN __MAIN main_ main__ _main; do
AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@define $ac_fortran_dm_var $ac_func]])],
[ac_cv_fortran_dummy_main=$ac_func; break])
[ac_cv_fortran_dummy_main=$ac_func; break])
done
fi
AC_LANG_POP(C)dnl
@ -837,15 +837,15 @@ AS_IF([test "$[]_AC_FC[]_DUMMY_MAIN" != unknown],
[m4_default([$1],
[if test $[]_AC_FC[]_DUMMY_MAIN != none; then
AC_DEFINE_UNQUOTED([]_AC_FC[]_DUMMY_MAIN, $[]_AC_FC[]_DUMMY_MAIN,
[Define to dummy `main' function (if any) required to
link to the Fortran libraries.])
[Define to dummy `main' function (if any) required to
link to the Fortran libraries.])
if test "x$ac_cv_fc_dummy_main" = "x$ac_cv_f77_dummy_main"; then
AC_DEFINE([FC_DUMMY_MAIN_EQ_F77], 1,
[Define if F77 and FC dummy `main' functions are identical.])
[Define if F77 and FC dummy `main' functions are identical.])
fi
fi])],
[m4_default([$2],
[AC_MSG_FAILURE([linking to Fortran libraries from C fails])])])
[AC_MSG_FAILURE([linking to Fortran libraries from C fails])])])
])# _AC_FC_DUMMY_MAIN
@ -880,7 +880,7 @@ AC_LANG_POP(Fortran)dnl
AC_DEFUN([_AC_FC_MAIN],
[_AC_FORTRAN_ASSERT()dnl
AC_CACHE_CHECK([for alternate main to link with _AC_LANG libraries],
ac_cv_[]_AC_LANG_ABBREV[]_main,
ac_cv_[]_AC_LANG_ABBREV[]_main,
[ac_[]_AC_LANG_ABBREV[]_m_save_LIBS=$LIBS
LIBS="$LIBS $[]_AC_LANG_PREFIX[]LIBS"
ac_fortran_dm_var=[]_AC_FC[]_DUMMY_MAIN
@ -894,7 +894,7 @@ AC_CACHE_CHECK([for alternate main to link with _AC_LANG libraries],
@%:@ undef $ac_fortran_dm_var
@%:@endif
@%:@define main $ac_func])],
[ac_cv_fortran_main=$ac_func; break])
[ac_cv_fortran_main=$ac_func; break])
done
AC_LANG_POP(C)dnl
ac_cv_[]_AC_LANG_ABBREV[]_main=$ac_cv_fortran_main
@ -902,8 +902,8 @@ AC_CACHE_CHECK([for alternate main to link with _AC_LANG libraries],
LIBS=$ac_[]_AC_LANG_ABBREV[]_m_save_LIBS
])
AC_DEFINE_UNQUOTED([]_AC_FC[]_MAIN, $ac_cv_[]_AC_LANG_ABBREV[]_main,
[Define to alternate name for `main' routine that is
called from a `main' in the Fortran libraries.])
[Define to alternate name for `main' routine that is
called from a `main' in the Fortran libraries.])
])# _AC_FC_MAIN
@ -945,7 +945,7 @@ AC_LANG_POP(Fortran)dnl
AC_DEFUN([__AC_FC_NAME_MANGLING],
[_AC_FORTRAN_ASSERT()dnl
AC_CACHE_CHECK([for _AC_LANG name-mangling scheme],
ac_cv_[]_AC_LANG_ABBREV[]_mangling,
ac_cv_[]_AC_LANG_ABBREV[]_mangling,
[AC_COMPILE_IFELSE(
[ subroutine foobar()
return
@ -992,16 +992,16 @@ AC_CACHE_CHECK([for _AC_LANG name-mangling scheme],
if test "$ac_success_extra" = "yes"; then
ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_case case"
if test -z "$ac_underscore"; then
ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, no underscore"
if test -z "$ac_underscore"; then
ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, no underscore"
else
ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, underscore"
fi
if test -z "$ac_extra"; then
ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, no extra underscore"
ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, underscore"
fi
if test -z "$ac_extra"; then
ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, no extra underscore"
else
ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, extra underscore"
fi
ac_cv_[]_AC_LANG_ABBREV[]_mangling="$ac_cv_[]_AC_LANG_ABBREV[]_mangling, extra underscore"
fi
else
ac_cv_[]_AC_LANG_ABBREV[]_mangling="unknown"
fi
@ -1057,32 +1057,32 @@ AH_TEMPLATE(_AC_FC[_FUNC_],
[As ]_AC_FC[_FUNC, but for C identifiers containing underscores.])dnl
case $ac_cv_[]_AC_LANG_ABBREV[]_mangling in
"lower case, no underscore, no extra underscore")
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [name])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [name]) ;;
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [name])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [name]) ;;
"lower case, no underscore, extra underscore")
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [name])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [name ## _]) ;;
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [name])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [name ## _]) ;;
"lower case, underscore, no extra underscore")
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [name ## _])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [name ## _]) ;;
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [name ## _])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [name ## _]) ;;
"lower case, underscore, extra underscore")
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [name ## _])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [name ## __]) ;;
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [name ## _])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [name ## __]) ;;
"upper case, no underscore, no extra underscore")
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [NAME])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [NAME]) ;;
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [NAME])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [NAME]) ;;
"upper case, no underscore, extra underscore")
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [NAME])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [NAME ## _]) ;;
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [NAME])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [NAME ## _]) ;;
"upper case, underscore, no extra underscore")
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [NAME ## _])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [NAME ## _]) ;;
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [NAME ## _])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [NAME ## _]) ;;
"upper case, underscore, extra underscore")
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [NAME ## _])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [NAME ## __]) ;;
AC_DEFINE(_AC_FC[_FUNC(name,NAME)], [NAME ## _])
AC_DEFINE(_AC_FC[_FUNC_(name,NAME)], [NAME ## __]) ;;
*)
AC_MSG_WARN([unknown Fortran name-mangling scheme])
;;
AC_MSG_WARN([unknown Fortran name-mangling scheme])
;;
esac
])# _AC_FC_WRAPPERS
@ -1173,7 +1173,7 @@ AC_LANG_POP(Fortran)dnl
AC_DEFUN([AC_FC_SRCEXT],
[AC_LANG_PUSH(Fortran)dnl
AC_CACHE_CHECK([for Fortran flag to compile .$1 files],
ac_cv_fc_srcext_$1,
ac_cv_fc_srcext_$1,
[ac_ext=$1
ac_fcflags_srcext_save=$ac_fcflags_srcext
ac_fcflags_srcext=
@ -1225,27 +1225,27 @@ AC_LANG_POP(Fortran)dnl
AC_DEFUN_ONCE([AC_FC_FREEFORM],
[AC_LANG_PUSH(Fortran)dnl
AC_CACHE_CHECK([for Fortran flag needed to allow free-form source],
ac_cv_fc_freeform,
ac_cv_fc_freeform,
[ac_cv_fc_freeform=unknown
ac_fc_freeform_FCFLAGS_save=$FCFLAGS
for ac_flag in none -ffree-form -FR -free -qfree -Mfree -Mfreeform \
-freeform "-f free"
-freeform "-f free"
do
test "x$ac_flag" != xnone && FCFLAGS="$ac_fc_freeform_FCFLAGS_save $ac_flag"
AC_COMPILE_IFELSE([
program freeform
! FIXME: how to best confuse non-freeform compilers?
print *, 'Hello ', &
'world.'
'world.'
end],
[ac_cv_fc_freeform=$ac_flag; break])
[ac_cv_fc_freeform=$ac_flag; break])
done
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
FCFLAGS=$ac_fc_freeform_FCFLAGS_save
])
if test "x$ac_cv_fc_freeform" = xunknown; then
m4_default([$2],
[AC_MSG_ERROR([Fortran does not accept free-form source], 77)])
[AC_MSG_ERROR([Fortran does not accept free-form source], 77)])
else
if test "x$ac_cv_fc_freeform" != xnone; then
FCFLAGS="$FCFLAGS $ac_cv_fc_freeform"