~ubuntu-branches/ubuntu/vivid/slurm-llnl/vivid

« back to all changes in this revision

Viewing changes to auxdir/x_ac_blcr.m4

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2009-09-24 23:28:15 UTC
  • mfrom: (1.1.11 upstream) (3.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20090924232815-enh65jn32q1ebg07
Tags: 2.0.5-1
* New upstream release 
* Changed dependecy from lib-mysqlclient15 to lib-mysqlclient 
* Added Default-Start for runlevel 2 and 4 and $remote_fs requirement in
  init.d scripts (Closes: #541252)
* Postinst checks for wrong runlevels 2 and 4 links
* Upgraded to standard version 3.8.3
* Add lintian overrides for missing slurm-llnl-configurator.html in doc
  base registration
* modified postrm scripts to ignore pkill return value in order to avoid
  postrm failure when no slurm process is running
* Checking for slurmctld.pid before cancelling running and pending
  jobs during package removal 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
##*****************************************************************************
 
2
## $Id: x_ac_blcr.m4 0001 2009-01-10 16:06:05Z hjcao $
 
3
##*****************************************************************************
 
4
#  AUTHOR:
 
5
#    Copied from x_ac_munge.
 
6
#    
 
7
#
 
8
#  SYNOPSIS:
 
9
#    X_AC_BLCR()
 
10
#
 
11
#  DESCRIPTION:
 
12
#    Check the usual suspects for an BLCR installation,
 
13
#    updating CPPFLAGS and LDFLAGS as necessary.
 
14
#
 
15
#  WARNINGS:
 
16
#    This macro must be placed after AC_PROG_CC and before AC_PROG_LIBTOOL.
 
17
##*****************************************************************************
 
18
 
 
19
AC_DEFUN([X_AC_BLCR], [
 
20
 
 
21
  _x_ac_blcr_dirs="/usr /usr/local /opt/freeware /opt/blcr"
 
22
  _x_ac_blcr_libs="lib64 lib"
 
23
 
 
24
  AC_ARG_WITH(
 
25
    [blcr],
 
26
    AS_HELP_STRING(--with-blcr=PATH,Specify path to BLCR installation),
 
27
    [_x_ac_blcr_dirs="$withval $_x_ac_blcr_dirs"])
 
28
 
 
29
  AC_CACHE_CHECK(
 
30
    [for blcr installation],
 
31
    [x_ac_cv_blcr_dir],
 
32
    [
 
33
      for d in $_x_ac_blcr_dirs; do
 
34
        test -d "$d" || continue
 
35
        test -d "$d/include" || continue
 
36
        test -f "$d/include/libcr.h" || continue
 
37
        for bit in $_x_ac_blcr_libs; do
 
38
          test -d "$d/$bit" || continue
 
39
        
 
40
          _x_ac_blcr_libs_save="$LIBS"
 
41
          LIBS="-L$d/$bit -lcr $LIBS"
 
42
          AC_LINK_IFELSE(
 
43
            AC_LANG_CALL([], cr_init),
 
44
            AS_VAR_SET(x_ac_cv_blcr_dir, $d))
 
45
          LIBS="$_x_ac_blcr_libs_save"
 
46
          test -n "$x_ac_cv_blcr_dir" && break
 
47
        done
 
48
        test -n "$x_ac_cv_blcr_dir" && break
 
49
      done
 
50
    ])
 
51
 
 
52
  if test -z "$x_ac_cv_blcr_dir"; then
 
53
    AC_MSG_WARN([unable to locate blcr installation])
 
54
  else
 
55
    BLCR_HOME="$x_ac_cv_blcr_dir"
 
56
    BLCR_LIBS="-lcr"
 
57
    BLCR_CPPFLAGS="-I$x_ac_cv_blcr_dir/include"
 
58
    BLCR_LDFLAGS="-L$x_ac_cv_blcr_dir/$bit"
 
59
  fi
 
60
 
 
61
  AC_DEFINE_UNQUOTED(BLCR_HOME, "$x_ac_cv_blcr_dir", [Define BLCR installation home])
 
62
  AC_SUBST(BLCR_HOME)
 
63
 
 
64
  AC_SUBST(BLCR_LIBS)
 
65
  AC_SUBST(BLCR_CPPFLAGS)
 
66
  AC_SUBST(BLCR_LDFLAGS)
 
67
 
 
68
  AM_CONDITIONAL(WITH_BLCR, test -n "$x_ac_cv_blcr_dir")
 
69
])