1
1
- LAM_SETUP_F77
- LAM_SETUP_F90
- LAM_C_WEAK_SYMBOLS

This commit was SVN r109.
Этот коммит содержится в:
Jeff Squyres 2004-01-08 13:34:31 +00:00
родитель 0d0796ce71
Коммит bc430950d6
4 изменённых файлов: 128 добавлений и 1 удалений

Просмотреть файл

@ -17,4 +17,6 @@ EXTRA_DIST = \
lam_get_version.m4 \
lam_get_version.sh \
lam_setup_cc.m4 \
lam_setup_cxx.m4
lam_setup_cxx.m4 \
lam_setup_f77.m4 \
lam_setup_f90.m4

34
config/c_weak_symbols.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,34 @@
dnl -*- shell-script -*-
dnl
dnl $HEADER$
dnl
define([LAM_C_WEAK_SYMBOLS],[
#
# Arguments: None
#
# Depdencies: None
#
# Check to see if the C compiler can handle weak symbols
#
# Sets LAM_C_WEAK_SYMBOLS=1 if the C compiler has support for weak
# symbols.
#
AC_MSG_CHECKING([for weak symbols])
AC_LINK_IFELSE(AC_LANG_SOURCE([[#pragma weak fake = real
extern int fake(int i);
int real(int i);
int real(int i) { return i; }
int main(int argc, char* argv[]) {
return fake(3);
}]]), lam_happy=1, lam_happy=0)
if test "$lam_happy" = "1"; then
AC_MSG_RESULT([yes])
LAM_C_HAVE_WEAK_SYMBOLS=1
else
AC_MSG_RESULT([no])
LAM_C_HAVE_WEAK_SYMBOLS=0
fi
unset lam_happy])dnl

43
config/lam_setup_f77.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,43 @@
dnl -*- shell-script -*-
dnl
dnl $HEADER$
dnl
AC_DEFUN(LAM_SETUP_F77,[
# Modularize this setup so that sub-configure.in scripts can use this
# same setup code.
lam_show_subtitle "Fortran 77 compiler"
if test "$enable_fortran" = "no"; then
AC_MSG_WARN([*** Fortran disabled by user])
LAM_WANT_F77=0
elif test "$enable_f77" = "no"; then
AC_MSG_WARN([*** Fortran 77 disabled by user])
LAM_WANT_F77=0
else
#
# Check for the compiler
#
# Note that we don't actually *use* the fortran compiler to build
# anything in LAM; it's only used here in configure to find out
# symbol conventions, type sizes, etc. We also pass it down to
# the wrapper compiler mpif77.
#
lam_fflags_save="$FFLAGS"
AC_PROG_F77
FFLAGS="$lam_fflags_save"
if test -z "$F77"; then
AC_MSG_WARN([*** Could not find Fortran 77 compiler])
LAM_WANT_F77=0
else
LAM_WANT_F77=1
BASEF77="`basename $F77`"
fi
fi
AM_CONDITIONAL(BUILD_MPI_F77, test "$LAM_WANT_F77" = "1")
])

48
config/lam_setup_f90.m4 Обычный файл
Просмотреть файл

@ -0,0 +1,48 @@
dnl -*- shell-script -*-
dnl
dnl $HEADER$
dnl
AC_DEFUN(LAM_SETUP_F90,[
# Modularize this setup so that sub-configure.in scripts can use this
# same setup code.
lam_show_subtitle "Fortran 90/95 compiler"
if test "$enable_fortran" = "no"; then
AC_MSG_WARN([*** Fortran disabled by user])
LAM_WANT_F90=0
elif test "$enable_f90" = "no"; then
AC_MSG_WARN([*** Fortran 90/95 disabled by user])
LAM_WANT_F90=0
else
#
# Check for the compiler
#
# Note that we don't actually *use* the fortran compiler to build
# anything in LAM; it's only used here in configure to find out
# symbol conventions, type sizes, etc. We also pass it down to
# the wrapper compiler mpif90.
#
lam_fflags_save="$FFLAGS"
AC_PROG_FC
FFLAGS="$lam_fflags_save"
if test -z "$FC"; then
AC_MSG_WARN([*** Could not find Fortran 90/95 compiler])
LAM_WANT_F90=0
elif test "$FC" = "$F77"; then
AC_MSG_WARN([*** Found same compiler for Fortran 77 and 90/95])
AC_MSG_WARN([*** Assuming no Fortran 90/95 compiler; disabling])
AC_MSG_WARN([*** Fortran 90 MPI bindings])
LAM_WANT_F90=0
else
LAM_WANT_F90=1
BASEF90="`basename $FC`"
fi
fi
AM_CONDITIONAL(BUILD_MPI_F90, test "$LAM_WANT_F90" = "1")
])