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