Changeset 427


Ignore:
Timestamp:
Jul 18, 2007 6:22:54 PM (13 years ago)
Author:
andreasw
Message:

added COIN_CHECK_FILE which also works for cross compilation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/coin.m4

    r426 r427  
    208208
    209209###########################################################################
     210#                            COIN_CHECK_FILE                              #
     211###########################################################################
     212
     213# A simple replacement for AC_CHECK_FILE that works for cross compilation
     214
     215AC_DEFUN([AC_COIN_CHECK_FILE],
     216[if test -r $1; then
     217  $2
     218  :
     219else
     220  $3
     221  :
     222fi
     223])
     224
     225###########################################################################
    210226#                        COIN_THIRDPARTY_SUBDIRS                          #
    211227###########################################################################
     
    15011517    correct_version='1.5.22'
    15021518    grep_version=`echo  $correct_version | sed -e 's/\\./\\\\\\./g'`
    1503     AC_CHECK_FILE([$want_dir/libtool/ltmain.sh],
    1504                   [have_ltmain=yes],
    1505                   [have_ltmain=no])
     1519    AC_COIN_CHECK_FILE([$want_dir/libtool/ltmain.sh],
     1520                       [have_ltmain=yes],
     1521                       [have_ltmain=no])
    15061522    AC_MSG_CHECKING([whether we are using the correct version ($correct_version) of libtool.])
    15071523    if test $have_ltmain = yes; then
     
    15241540    want_dir=$AUTOTOOLS_DIR/share
    15251541  fi
    1526   AC_CHECK_FILE([$want_dir/aclocal/libtool.m4],
    1527                 [LIBTOOLM4="$want_dir/aclocal/libtool.m4"],
    1528                 [AC_MSG_ERROR([I cannot find the libtool.m4 file.])])
     1542  AC_COIN_CHECK_FILE([$want_dir/aclocal/libtool.m4],
     1543                     [LIBTOOLM4="$want_dir/aclocal/libtool.m4"],
     1544                     [AC_MSG_ERROR([I cannot find the libtool.m4 file.])])
    15291545
    15301546  # Check if we have an Externals file
     
    24252441
    24262442    m4_ifval([$3],
    2427         [AC_CHECK_FILE([$$2INCDIR/$3],[],
     2443        [AC_COIN_CHECK_FILE([$$2INCDIR/$3],[],
    24282444             [AC_MSG_ERROR([Cannot find file $3 in $$2INCDIR])])])
    24292445
     
    25192535  fi
    25202536elif test "$use_asldir" != "no"; then
    2521   AC_CHECK_FILE([$use_asldir/$ampllib],[],
    2522                 [AC_MSG_ERROR([ASL directory \"$use_asldir\" specified, but library missing])])
    2523   AC_CHECK_FILE([$use_asldir/asl.h],[],
    2524                 [AC_MSG_ERROR([ASL directory \"$use_asldir\" specified, but header files are missing])])
     2537  AC_COIN_CHECK_FILE([$use_asldir/$ampllib],[],
     2538                     [AC_MSG_ERROR([ASL directory \"$use_asldir\" specified, but library missing])])
     2539  AC_COIN_CHECK_FILE([$use_asldir/asl.h],[],
     2540                     [AC_MSG_ERROR([ASL directory \"$use_asldir\" specified, but header files are missing])])
    25252541  use_asldir=`cd $use_asldir; pwd`
    25262542  case $build in
     
    29152931
    29162932  # Check if hearders are there
    2917   AC_CHECK_FILE([$mumps_dir/include/dmumps_c.h],
    2918                 [],
    2919                 [AC_MSG_ERROR([I cannot find headers for MUMPS])])
     2933  AC_COIN_CHECK_FILE([$mumps_dir/include/dmumps_c.h],
     2934                     [],
     2935                     [AC_MSG_ERROR([I cannot find headers for MUMPS])])
    29202936  LIBS="$mumps_dir/lib/libdmumps.$libe $mumps_dir/lib/libpord.$libe $mumps_dir/libseq/libmpiseq.$libe $LIBS"
    29212937  ADDLIBS="$mumps_dir/lib/libdmumps.$libe $mumps_dir/lib/libpord.$libe $mumps_dir/libseq/libmpiseq.$libe $ADDLIBS"
Note: See TracChangeset for help on using the changeset viewer.