1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253
|
# -*- shell-script -*-
#
# $Id: configure.in,v 1.33 2001/05/19 04:10:14 bbarrett Exp $
#
dnl Disable caching.
define([AC_CACHE_LOAD], )dnl
define([AC_CACHE_SAVE], )dnl
#
# Init autoconf
#
AC_INIT(src/xmpi/xmpi.cc)
AC_CONFIG_AUX_DIR(config)
#
# Init automake
#
XMPI_VERSION=`cat $srcdir/VERSION`
AC_SUBST(XMPI_VERSION)
echo "Configuring XMPI version $XMPI_VERSION"
# The third argument to AM_INIT_AUTOMAKE surpresses the PACKAGE and
# VERSION macors
AM_INIT_AUTOMAKE(xmpi, $XMPI_VERSION, 'no')
AM_CONFIG_HEADER(src/xmpi/xmpi_config.h)
AC_DEFINE_UNQUOTED(XMPI_VERSION, "$XMPI_VERSION")
# Get our host type...
AC_CANONICAL_HOST
AC_DEFINE_UNQUOTED(XMPI_ARCH,"$host")
AC_PREFIX_DEFAULT(/usr/local)
# check for specification of C++ compiler
# overrules default mpiCC with lam
CXX=mpiCC;
CC=mpicc
AC_ARG_WITH(cc, [ --with-cc=cc use C compiler cc])
AC_ARG_WITH(cflags, [ --with-cflags=CFLAGS use C compiler flags CFLAGS])
AC_ARG_WITH(cxx, [ --with-cxx=CC use C++ compiler CC])
AC_ARG_WITH(cxxflags, [ --with-cxxflags=CXXFLAGS use C++ compiler flags CXXFLAGS])
if test -n "$with_cxx"; then
if test $with_cxx = yes; then
AC_MSG_ERROR(the --with-cxx option requires the compiler name)
fi
AC_MSG_WARN(*** You are not using the mpiCC compiler recommended)
AC_MSG_WARN(*** for building the LAM libxmpi. Be sure to set)
AC_MSG_WARN(*** the approprate include paths to the needed files)
CXX=$with_cxx;
fi
if test -n "$with_cxxflags"; then
if test $with_cxxflags = yes; then
AC_MSG_ERROR(the --with-cxxflags option requires some option)
fi
CXXFLAGS=$with_cxxflags;
fi
if test -n "$with_cc"; then
if test $with_cc = yes; then
AC_MSG_ERROR(the --with-cc option requires the compiler name)
fi
CC=$with_cc
fi
if test -n "$with_cflags"; then
if test $with_cflags = yes; then
AC_MSG_ERROR(the --with-cflags option requires some option)
fi
CFLAGS=$with_cflags;
fi
#
# In theory, we have a working compiler set now.
# Tell everyone C++ is our primary language and get our
# copmilers. We need C++ 'cuz that's what our code is in
# and C 'cuz that is what libtool wants...
#
AC_LANG_C
AC_PROG_CXX
AC_PROG_CC
if test -z "$CXXFLAGS"; then
lam_cxxflags_save="$CXXFLAGS"
if test "$GCC" = yes; then
CXXFLAGS=-O
else
case "$host_os" in
solaris) CXXFLAGS=-fast;;
*) CXXFLAGS=-O;;
esac
fi
fi
# BWB: There was a time when XMPI worked with MPI implementations
# other than LAM. This is no longer the case. Since most of the code
# to make that work (build wise) bit-rotted into uselessness long ago,
# it has been removed. It is believed (although not tested) that to
# make it work again, all you have to do is set LIBXMPI to the vendor
# name and set LDFLAGS to the right place so that it can find -lxmpi
#
# The AM_CONDITIONAL is so that we can decide whether to buld the
# included libxmpi that works with LAM. So don't set LIBXMPI to
# lib-lam unless you want to buld the LAM libxmpi
LIBXMPI=lib-lam
AM_CONDITIONAL(WANT_LAM_XMPI,test "$LIBXMPI"="lib-lam")
AC_SUBST(LIBXMPI)
dnl Take care of some specific compiler options.
dnl Force use of ANSI C under HP-UX.
if test "$ac_cv_prog_gcc" = no; then
us=`(uname -s) 2>/dev/null` || us=unknown
case "$us" in
HP-UX) CXXFLAGS="$CXXFLAGS -Ae" ;;
*) ;;
esac
fi
AC_SUBST(CXXFLAGS)
#
# Check for X11 and Motif libraries..
#
AC_LANG_SAVE
AC_LANG_C
AC_PATH_XTRA
if test "$no_x" = yes; then
AC_MSG_ERROR([Could not find X includes or libs. Cannot continue.])
fi
LSC_FIND_MOTIF
if test "$motif_libraries_result" = "(none)" || test "$motif_includes_result" = "(none)"; then
AC_MSG_ERROR([Could not find Motif includes or libs. Cannot continue.])
fi
X_CXXFLAGS=$X_CFLAGS
AC_SUBST(X_CXXFLAGS)
AC_SUBST(X_LIBS)
AC_LANG_RESTORE
#
# Make sure that we have the LAM header files.
#
# Only do this if compiling for use with LAM
#
LSC_MPI_CHECK_TRILLIUM
# Check for programs.
# Abort if we cannot find one of them
AC_PROG_CXXCPP
if test "$CXXCPP" = ""; then
AC_MSG_ERROR([Could not find C preprocessor. Cannot continue.])
fi
AC_PATH_PROG(RM,rm)
if test "$RM" = ""; then
AC_MSG_ERROR([Could not find rm. Cannot continue.])
fi
AC_PATH_PROG(SHELL_CMD, sh)
if test "$SHELL_CMD" = ""; then
AC_MSG_ERROR([Could not find Bourne shell. Cannot continue.])
fi
# Used to Check for typedefs, structures, and compiler characteristics.
AC_C_BIGENDIAN
# Check for library functions.
AC_CHECK_FUNCS(atexit getcwd)
AC_CACHE_CHECK([if need to include sys/select.h],
lam_cv_need_sys_select_h,
[AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>], [fd_set s; FD_ZERO(&s);],
lam_cv_need_sys_select_h=no, lam_cv_need_sys_select_h=yes)])
if test $lam_cv_need_sys_select_h = yes; then
AC_DEFINE(NEED_SYS_SELECT_H)
fi
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(float, 4)
AC_CHECK_SIZEOF(double, 4)
# Checks for header files
AC_HEADER_STDC
LSC_MPI_CHECK_MPI_H
#
# Find the DEPDIRS for both C++ and MPI
#
LSC_CXX_FIND_DEPDIRS(XMPI)
LSC_MPI_FIND_DEPDIRS(XMPI)
DEPFLAGS="$XMPI_CXX_DEPDIRS $XMPI_MPI_DEPDIRS"
AC_SUBST(DEPFLAGS)
#
# Find the template repository for our C++ compiler.
# This is used for make clean
#
LSC_CXX_FIND_TEMPLATE_REPOSITORY(XMPI)
#
# Make automake clean emacs ~ files for "make clean"
#
CLEANFILES="-r *~ $XMPI_CXX_TEMPLATE_REPOSITORY"
AC_SUBST(CLEANFILES)
#
# Check for "makedepend". Not everyone has this.
#
AC_CHECK_PROGS(MAKEDEPEND, makedepend, no)
#
# ARGH! Some Sun Solaris Workshop 5.0 compilers appear to have a
# broken version of getline. I hate Sun. I hate Sun. I hate Sun.
# But they do make bcheck...
#
LSC_CXX_HAVE_BROKEN_GETLINE(XMPI)
#
# Libtool magic
# Disable the shared build default (users can override this, though)
#
AM_DISABLE_SHARED
AM_PROG_LIBTOOL
AC_OUTPUT(
Makefile
app-defaults/Makefile
config/Makefile
man/Makefile
man/man1/Makefile
src/Makefile
src/Bitmaps/Makefile
src/Pixmaps/Makefile
src/libxmpi/Makefile
src/xmpi/Makefile
)
|