Changeset 37


Ignore:
Timestamp:
Jun 8, 2006 2:41:07 PM (14 years ago)
Author:
andreasw
Message:

added MPI compiler variables; improved run_autotools script

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r36 r37  
    329329CXXFLAGS="$coin_cv_cxxflags"
    330330
     331AC_ARG_VAR(MPICXX,[C++ MPI Compiler])
     332if test x"$MPICXX" = x; then :; else
     333  AC_MSG_NOTICE([Will use MPI C++ compiler $MPICXX])
     334  CXX="$MPICXX"
     335fi
     336
    331337AC_LANG_POP(C++)
    332338]) # AC_COIN_PROG_CXX
     
    577583]) # AC_CACHE_CHECK([for C compiler options CXXFLAGS]
    578584CFLAGS="$coin_cv_cflags"
     585
     586AC_ARG_VAR(MPICC,[C MPI Compiler])
     587if test x"$MPICC" = x; then :; else
     588  AC_MSG_NOTICE([Will use MPI C compiler $MPICC])
     589  CC="$MPICC"
     590fi
    579591
    580592AC_LANG_POP(C)
     
    707719]) # AC_CACHE_CHECK([for Fortran compiler options FFLAGS]
    708720FFLAGS="$coin_cv_fflags"
     721
     722AC_ARG_VAR(MPIF77,[Fortran MPI Compiler])
     723if test x"$MPIF77" = x; then :; else
     724  AC_MSG_NOTICE([Will use MPI Fortran compiler $MPIF77])
     725  F77="$MPIF77"
     726fi
    709727
    710728AC_LANG_POP([Fortran 77])
  • trunk/run_autotools

    r35 r37  
    11#!/bin/sh
    22
    3 pos_dirs=`find . -name configure.ac | sed -e s%/configure.ac%%g`
    4 dirs=
    5 for dir in $pos_dirs; do
    6   if test -r $dir/configure.ac; then
    7     dirs="$dirs $dir"
    8   fi
    9 done
     3ver_autoconf='2.59'
     4ver_automake='1.9.6'
     5ver_libtool='1.5.22'
     6EGREP='grep -E'
     7
     8# Check if the correct version of the autotools is used
     9if test x$AUTOTOOLS_DIR = x; then
     10  AUTOTOOLS_DIR=$HOME
     11fi
     12
     13grep_version=`echo  $ver_autoconf | sed -e 's/\\./\\\\\\./g'`
     14autoconf --version > confauto.out 2>&1
     15if $EGREP $grep_version confauto.out >/dev/null 2>&1; then :; else
     16  echo You are not using the correct version of autoconf
     17  rm -f confauto.out
     18  exit
     19fi
     20rm -f confauto.out
     21autoconf_dir=`which autoconf | sed -e 's=/autoconf=='`
     22autoconf_dir=`cd $autoconf_dir; pwd`
     23if test $autoconf_dir = `cd $AUTOTOOLS_DIR/bin; pwd`; then :; else
     24  echo autoconf is not picked up from the correct location
     25  exit
     26fi
     27
     28grep_version=`echo  $ver_automake | sed -e 's/\\./\\\\\\./g'`
     29automake --version > confauto.out 2>&1
     30if $EGREP $grep_version confauto.out >/dev/null 2>&1; then :; else
     31  echo You are not using the correct version of automake
     32  rm -f confauto.out
     33  exit
     34fi
     35rm -f confauto.out
     36autoconf_dir=`which automake | sed -e 's=/automake=='`
     37autoconf_dir=`cd $autoconf_dir; pwd`
     38if test $autoconf_dir = `cd $AUTOTOOLS_DIR/bin; pwd`; then :; else
     39  echo automake is not picked up from the correct location
     40  exit
     41fi
     42
     43grep_version=`echo  $ver_libtool | sed -e 's/\\./\\\\\\./g'`
     44ltfile=$AUTOTOOLS_DIR/share/libtool/ltmain.sh
     45if test -r $ltfile; then :; else
     46  echo Cannot file $ltfile
     47fi
     48if $EGREP $grep_version $ltfile >/dev/null 2>&1; then :; else
     49  echo You are not using the correct verion of libtool
     50fi
     51
     52if test $# != 0; then
     53  dirs="$*"
     54else
     55  pos_dirs=`find . -name configure.ac | sed -e s%/configure.ac%%g`
     56  dirs=
     57  for dir in $pos_dirs; do
     58    if test -r $dir/configure.ac; then
     59      dirs="$dirs $dir"
     60    fi
     61  done
     62fi
    1063echo Running autotools in $dirs
    1164
     
    2679
    2780for dir in $dirs; do
    28   (cd $dir
    29    echo creating acinclude.m4 in $dir
    30    cat $AUTOTOOLS_DIR/share/aclocal/libtool.m4 $toolsdir/coin.m4> acinclude.m4
    31    echo running aclocal in $dir
    32    aclocal
    33    if grep AC_CONFIG_HEADER configure.ac >/dev/null 2>&1; then
    34      echo running autoheader in $dir
    35      autoheader
     81  (if test -r $dir/configure.ac; then
     82     cd $dir
     83     echo creating acinclude.m4 in $dir
     84     cat $AUTOTOOLS_DIR/share/aclocal/libtool.m4 $toolsdir/coin.m4> acinclude.m4
     85     echo running aclocal in $dir
     86     aclocal
     87     if grep AC_CONFIG_HEADER configure.ac >/dev/null 2>&1; then
     88       echo running autoheader in $dir
     89       autoheader
     90     fi
     91     echo running automake in $dir
     92     automake
     93     echo running autoconf in $dir
     94     autoconf
     95   else
     96     echo "*** No configure.ac file in $dir - SKIPPING! ***"
    3697   fi
    37    echo running automake in $dir
    38    automake
    39    echo running autoconf in $dir
    40    autoconf
    4198   )
    4299done
Note: See TracChangeset for help on using the changeset viewer.