Changeset 216 for trunk/configure


Ignore:
Timestamp:
04/08/10 15:31:29 (14 years ago)
Author:
bas
Message:

New configure options to determine version and where the libs are installed, borrowed from mpiexec

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r177 r216  
    577577PACKAGE_BUGREPORT=
    578578
    579 ac_unique_file="src/pbs.py"
     579ac_unique_file="src/pbs_2.4.py"
    580580ac_subst_vars='SHELL
    581581PATH_SEPARATOR
     
    616616target_alias
    617617pyexecdir
    618 pbspath
     618pbsdir
     619PBSCONFIG
     620pbs_library_dir
     621pbs_version
    619622PYTHON
    620623PYTHON_VERSION
     
    11991202  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
    12001203  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
    1201 
    1202   --with-pbsdir=PATH    directory that contains the torque libraries
     1204  --with-pbsdir=PATH    The torque/pbs install directory
    12031205
    12041206_ACEOF
     
    16261628
    16271629
    1628 
     1630pbsdir_default=''
    16291631
    16301632# Check whether --with-pbsdir was given.
    16311633if test "${with_pbsdir+set}" = set; then
    1632   withval=$with_pbsdir; case "${withval}" in
    1633         *) pbspath="${withval}" ;;
    1634   esac
    1635 else
    1636   pbspath=""
    1637   pbspath=`pbs-config --libs`
    1638 
    1639 fi
     1634  withval=$with_pbsdir; pbsdir=$withval
     1635else
     1636  pbsdir=$pbsdir_default
     1637fi
     1638
     1639
     1640
     1641# Verify the PBS libs are there, but let Makefile handle including them
     1642# on the link line.  First check for modern torque pbs-config program using
     1643# $pbsdir and the rest of PATH, then fall back to looking around for the
     1644# libraries by hand.
     1645# Extract the first word of "pbs-config", so it can be a program name with args.
     1646set dummy pbs-config; ac_word=$2
     1647{ echo "$as_me:$LINENO: checking for $ac_word" >&5
     1648echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
     1649if test "${ac_cv_path_PBSCONFIG+set}" = set; then
     1650  echo $ECHO_N "(cached) $ECHO_C" >&6
     1651else
     1652  case $PBSCONFIG in
     1653  [\\/]* | ?:[\\/]*)
     1654  ac_cv_path_PBSCONFIG="$PBSCONFIG" # Let the user override the test with a path.
     1655  ;;
     1656  *)
     1657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
     1658as_dummy="$pbsdir:$pbsdir/bin:$pbsdir/../bin:$PATH"
     1659for as_dir in $as_dummy
     1660do
     1661  IFS=$as_save_IFS
     1662  test -z "$as_dir" && as_dir=.
     1663  for ac_exec_ext in '' $ac_executable_extensions; do
     1664  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     1665    ac_cv_path_PBSCONFIG="$as_dir/$ac_word$ac_exec_ext"
     1666    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     1667    break 2
     1668  fi
     1669done
     1670done
     1671IFS=$as_save_IFS
     1672
     1673  test -z "$ac_cv_path_PBSCONFIG" && ac_cv_path_PBSCONFIG="none"
     1674  ;;
     1675esac
     1676fi
     1677PBSCONFIG=$ac_cv_path_PBSCONFIG
     1678if test -n "$PBSCONFIG"; then
     1679  { echo "$as_me:$LINENO: result: $PBSCONFIG" >&5
     1680echo "${ECHO_T}$PBSCONFIG" >&6; }
     1681else
     1682  { echo "$as_me:$LINENO: result: no" >&5
     1683echo "${ECHO_T}no" >&6; }
     1684fi
     1685
     1686
     1687if test "$PBSCONFIG" != "none"; then
     1688  pbs_library_dir="`$PBSCONFIG --libs`"
     1689  pbs_version="`$PBSCONFIG --version`"
     1690else
     1691  pbs_library_DIR=""
     1692  pbs_version=""
     1693fi
     1694
     1695
     1696
    16401697
    16411698
     
    24302487target_alias!$target_alias$ac_delim
    24312488pyexecdir!$pyexecdir$ac_delim
    2432 pbspath!$pbspath$ac_delim
     2489pbsdir!$pbsdir$ac_delim
     2490PBSCONFIG!$PBSCONFIG$ac_delim
     2491pbs_library_dir!$pbs_library_dir$ac_delim
     2492pbs_version!$pbs_version$ac_delim
    24332493PYTHON!$PYTHON$ac_delim
    24342494PYTHON_VERSION!$PYTHON_VERSION$ac_delim
     
    24432503_ACEOF
    24442504
    2445   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 49; then
     2505  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 52; then
    24462506    break
    24472507  elif $ac_last_try; then
Note: See TracChangeset for help on using the changeset viewer.