a991d883c1
frameworks, and components without configure scripts instead of hard-coded shell variables (for projects and frameworks) and shell variable building (for components). * Add 3rd category of component configuration (in addition to configure scripts and no-configured components): configure.m4 components. These components can only be built as part of OMPI (like no-configure), but can provide an m4 file that is run as part of the main configure script. These macros can set whether the component should be built, along with just about any other configuration wanted. More care must be taken compared to configure components, as doing things like setting variables or calling AC_MSG_ERROR now affects the top-level configure script (so calling AC_MSG_ERROR if your component can't configure probably isn't what you want) * Added support to autogen.sh for the configure.m4-style components, as well as building up the m4_define lists ompi_mca.m4 now expects * Updated a number of macros to be more config.cache friendly (both so that config.cache can be used and so the test can be quickly run multiple times in the same configrue script): - ompi_config_asm - c_weak_symbols - c_get_alignment * Added new macros to be shared when configuring components: - ompi_objc.m4 (this actually provides AC_PROG_OBJC - don't ask...) - ompi_check_xgrid - ompi_check_tm - ompi_check_bproc * Updated a number of components to use configure.m4 instead of configure.stub - btl portals - io romio - tm ras and pls - bjs, lsf_bproc ras and bproc_seed pls - xgrid ras and pls - null iof (used by tm) This commit was SVN r6412.
61 строка
2.6 KiB
Bash
61 строка
2.6 KiB
Bash
dnl -*- shell-script -*-
|
|
dnl
|
|
dnl Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
dnl All rights reserved.
|
|
dnl Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
dnl All rights reserved.
|
|
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
dnl University of Stuttgart. All rights reserved.
|
|
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
|
dnl All rights reserved.
|
|
dnl $COPYRIGHT$
|
|
dnl
|
|
dnl Additional copyrights may follow
|
|
dnl
|
|
dnl $HEADER$
|
|
dnl
|
|
|
|
# OMPI_C_GET_ALIGN(type, config_var)
|
|
# ----------------------------------
|
|
# Determine datatype alignment.
|
|
# First arg is type, 2nd arg is config var to define.
|
|
AC_DEFUN([OMPI_C_GET_ALIGNMENT],[
|
|
AC_CACHE_CHECK([alignment of $1],
|
|
[AS_TR_SH([ompi_cv_c_align_$1])],
|
|
[AC_TRY_RUN([
|
|
#include <stddef.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
struct foo { char c; $1 x; };
|
|
int main(int argc, char* argv[])
|
|
{
|
|
struct foo *p = (struct foo *) malloc(sizeof(struct foo));
|
|
int diff;
|
|
FILE *f=fopen("conftestval", "w");
|
|
if (!f) exit(1);
|
|
diff = ((char *)&p->x) - ((char *)&p->c);
|
|
fprintf(f, "%d\n", (diff >= 0) ? diff : -diff);
|
|
return 0;
|
|
}], [AS_TR_SH([ompi_cv_c_align_$1])=`cat conftestval`],
|
|
[AC_MSG_WARN([*** Problem running configure test!])
|
|
AC_MSG_WARN([*** See config.log for details.])
|
|
AC_MSG_ERROR([*** Cannot continue.])],
|
|
[ # cross compile - do a non-executable test. Trick
|
|
# taken from the AC CVS repository. If only they'd
|
|
# get around to actually releasing something post 2.59...
|
|
_AC_COMPUTE_INT([offsetof (struct { char x; $1 y; }, y)],
|
|
[AS_TR_SH([ompi_cv_c_align_$1])],
|
|
[AC_INCLUDES_DEFAULT()
|
|
#ifndef offsetof
|
|
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
|
|
#endif
|
|
],
|
|
[AC_MSG_WARN([*** Problem running configure test!])
|
|
AC_MSG_WARN([*** See config.log for details.])
|
|
AC_MSG_ERROR([*** Cannot continue.])])])])
|
|
|
|
AC_DEFINE_UNQUOTED([$2], [$AS_TR_SH([ompi_cv_c_align_$1])], [Alignment of type $1])
|
|
eval "$2=$AS_TR_SH([ompi_cv_c_align_$1])"
|
|
|
|
/bin/rm -f conftest* ]) dnl
|