File: configure.ac

package info (click to toggle)
globus-gram-job-manager-pbs 2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,456 kB
  • ctags: 217
  • sloc: sh: 11,084; ansic: 855; perl: 711; makefile: 160
file content (221 lines) | stat: -rw-r--r-- 5,890 bytes parent folder | download | duplicates (2)
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
AC_PREREQ([2.60])

AC_INIT([globus_gram_job_manager_pbs],[2.4],[https://globus.atlassian.net/])
AC_SUBST([MAJOR_VERSION], [${PACKAGE_VERSION%%.*}])
AC_SUBST([MINOR_VERSION], [${PACKAGE_VERSION##*.}])
AC_SUBST([AGE_VERSION], [1])
AC_SUBST([PACKAGE_DEPS], ["globus-common >= 14, globus-scheduler-event-generator >= 4"])

AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([1.11 foreign parallel-tests tar-pax])
LT_INIT([dlopen win32-dll])

m4_include([dirt.sh])
AC_SUBST(DIRT_TIMESTAMP)
AC_SUBST(DIRT_BRANCH_ID)

AC_PROG_CC_C99

PKG_CHECK_MODULES([PACKAGE_DEP], $PACKAGE_DEPS)

AC_PATH_PROG(MPIEXEC, mpiexec, no)
if test "$MPIEXEC" = "no" ; then
    AC_MSG_WARN([Cannot locate mpiexec])
fi

AC_PATH_PROG(MPIRUN, mpirun, no)
if test "$MPIRUN" = "no" ; then
    AC_MSG_WARN([Cannot locate mpirun])
fi

AC_PATH_PROG(QDEL, qdel, no)
if test "$QDEL" = "no" ; then
    AC_MSG_WARN([Cannot locate qdel])
fi
AC_PATH_PROG(QSTAT, qstat, no)
if test "$QSTAT" = "no" ; then
    AC_MSG_WARN([Cannot locate qstat])
fi
AC_PATH_PROG(QSUB, qsub, no)
if test "$QSUB" = "no" ; then
    AC_MSG_WARN([Cannot locate qsub])
fi

AC_ARG_WITH(cluster,
    AC_HELP_STRING(
        [--without-cluster],
        [Disable using remote shell in job scripts]),
   [
     if test "$withval" != "no"; then
	 CLUSTER=1
     else
	 CLUSTER=0
     fi
   ],
   CLUSTER=1)

AC_SUBST(CLUSTER)

AC_ARG_WITH(cpu-per-node,
    AC_HELP_STRING(
        [--with-cpu-per-node=COUNT],
        [Run COUNT jobs per node when running a parallel job]),
   [ if test $withval -lt 0 2>/dev/null; then
       AC_MSG_ERROR(Invalid cpu-per-node count)
     fi
     CPU_PER_NODE=$withval
   ],
   CPU_PER_NODE=1)

AC_SUBST(CPU_PER_NODE)
       
AC_ARG_WITH(remote-shell,
    AC_HELP_STRING(
        [--with-remote-shell=REMOTE-SHELL-COMMAND|default],
        [Use REMOTE-SHELL-COMMAND to run job processes on PBS nodes in a cluster]),
            [ case "$withval" in
                default|yes)
                  AC_PATH_PROGS(REMOTE_SHELL, ssh rsh, no)
                  ;;
                *)
                  AC_PATH_PROG(REMOTE_SHELL, $withval, no)
                  ;;
              esac

              if test $REMOTE_SHELL = no; then
                  AC_MSG_ERROR("Cannot locate remote shell")
              fi
            ],
            [AC_PATH_PROGS(REMOTE_SHELL, ssh rsh, no)]
            )

AC_ARG_WITH(log-path,
    AC_HELP_STRING(
        [--with-log-path=DIRECTORY],
        [Parse PBS logs in DIRECTORY when using the SEG]),
    [PBS_LOG_PATH=$withval],
    [PBS_LOG_PATH=''])
AC_SUBST(PBS_LOG_PATH)

AM_CONDITIONAL(SEG_ENABLED_COND, [test "$SEG_ENABLED" = "yes"])

# SoftEnv installation directory
AC_ARG_WITH(softenv-dir,
   AC_HELP_STRING([--with-softenv-dir], [softenv_install_dir]),
   [SOFTENV_DIR=$withval],
   [SOFTENV_DIR=''])

AC_SUBST(SOFTENV_DIR)

xml_catalog_path="notset"
AC_ARG_WITH(
    xml-catalog,
    [  --with-xml-catalog=PATH       Path to XML catalog],
    [xml_catalog_path="$withval"],
    [xml_catalog_path="notset"])

AC_PATH_PROG(XSLTPROC, "xsltproc")
AC_PATH_PROG(XMLLINT, "xmllint")

if test "x$xml_catalog_path" != x"notset"; then
    if test ! -f "$xml_catalog_path"; then
        AC_MSG_ERROR([Invalid XML catalog path])
    else
        XML_CATALOG_PATH=$xml_catalog_path
        AC_SUBST(XML_CATALOG_PATH)
    fi
fi

AC_ARG_WITH(globus-state-dir,
	AC_HELP_STRING(
		[--with-globus-state-dir=PATH],
		[Path to Globus state files]),
	globusstatedir="$withval",
	globusstatedir=$localstatedir)
AC_SUBST(globusstatedir)

AC_ARG_WITH(seg,
	AC_HELP_STRING(
		[--with-seg=yes|no],
		[Enable GRAM configuration with the SEG module]),
	SEG_ENABLED="$withval",
	SEG_ENABLED="no")
case "$SEG_ENABLED" in
	yes|no)
            :
            ;;
	*)
	    AC_MSG_ERROR([Invalid argument to --with-seg])
	    ;;
esac


AM_CONDITIONAL(SEG_ENABLED_COND, [test "$SEG_ENABLED" = "yes"])

AC_PATH_PROG(XSLTPROC, "xsltproc")
AC_PATH_PROG(XMLLINT, "xmllint")
AC_MSG_CHECKING([docbook dtd])
DOCBOOK_DTD=http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd
docbook_dtd_available=no

if test "$XMLLINT" != no; then
    cat <<EOF | $XMLLINT --nonet --dtdvalid $DOCBOOK_DTD - > /dev/null 2>&1
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE jobtitle PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<jobtitle/>
EOF
    if test $? = 0; then
        docbook_dtd_available=yes
    fi
fi
AC_MSG_RESULT($docbook_dtd_available)
AC_SUBST(DOCBOOK_DTD)

AC_MSG_CHECKING([docbook xsl])
MAN_XSL=http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
docbook_xsl_available=no

if test "$XSLTPROC" != no; then
    cat <<EOF | $XSLTPROC --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl  - > /dev/null 2>&1
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE jobtitle PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<jobtitle/>
EOF
    if test $? = 0; then
        docbook_xsl_available=yes
    fi
fi
AC_MSG_RESULT($docbook_xsl_available)
AC_SUBST(MAN_XSL)

AM_CONDITIONAL(BUILD_MANPAGES, [
                test "$docbook_xsl_available" != "no" && \
                test "$docbook_dtd_available" != "no" && \
                test "$XSLTPROC" != "no" && \
                test "$XMLLINT" != "no"])

AC_ARG_WITH([perlmoduledir],
AC_HELP_STRING([--with-perlmoduledir=DIR],
[perl module directory [[PREFIX/lib/perl]]]),
[
    if test x$withval = "xno" -o x$withval = "xyes" ; then
        AC_MSG_ERROR([--with-perlmoduledir requires an argument])
    fi
    perlmoduledir=$withval
],
[
    perlmoduledir='${libdir}/perl'
])
AC_SUBST(perlmoduledir)

AC_CONFIG_LIBOBJ_DIR([seg])
AC_REPLACE_FUNCS([getline])

AC_CONFIG_FILES(
        globus-gram-job-manager-pbs-uninstalled.pc
        globus-gram-job-manager-pbs.pc
        Makefile
	globus-pbs.conf
	seg/Makefile
	version.h)
AC_OUTPUT