Salome HOME
Issue 0020406: Time compilation when recompiling
[modules/kernel.git] / salome_adm / unix / config_files / check_local.m4
1 dnl  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 dnl
3 dnl  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 dnl  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 dnl
6 dnl  This library is free software; you can redistribute it and/or
7 dnl  modify it under the terms of the GNU Lesser General Public
8 dnl  License as published by the Free Software Foundation; either
9 dnl  version 2.1 of the License.
10 dnl
11 dnl  This library is distributed in the hope that it will be useful,
12 dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 dnl  Lesser General Public License for more details.
15 dnl
16 dnl  You should have received a copy of the GNU Lesser General Public
17 dnl  License along with this library; if not, write to the Free Software
18 dnl  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 dnl
20 dnl  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 dnl
22 # Check for Local
23 AC_DEFUN([CHECK_LOCAL],
24 [
25  dnl AC_ARG_VAR([LOCAL], [])
26  AC_ARG_WITH([local], 
27              AC_HELP_STRING([--with-local],
28                             [tell configure script to use local submission. Default is --with-local.]),
29              [],
30              [withval=yes])
31
32  AC_MSG_CHECKING([for Local])
33
34  if test "x$withval" = "xyes"
35  then
36    WITH_LOCAL=yes
37
38    AC_MSG_RESULT([$withval])
39
40    AC_ARG_VAR([RM], [A path to a rm-like command])
41    AC_PATH_PROG([RM], [rm], [/bin/false])
42    AC_DEFINE_UNQUOTED(RM, "$RM", [A path to a rm-like command])
43
44    AC_ARG_VAR([SH], [A path to a sh-like command])
45    AC_PATH_PROG([SH], [sh], [/bin/false])
46    AC_DEFINE_UNQUOTED(SH, "$SH", [A path to a sh-like command])
47    AC_ARG_VAR([CP], [A path to a cp-like command])
48    AC_PATH_PROG([CP],  [cp],  [/bin/false])
49    AC_DEFINE_UNQUOTED(CP, "$CP", [A path to a cp-like command])
50
51    AC_ARG_VAR([RSH], [A path to a rsh-like command])
52    AC_PATH_PROG([RSH], [rsh], [/bin/false])
53    AC_DEFINE_UNQUOTED(RSH, "$RSH", [A path to a rsh-like command])
54    AC_ARG_VAR([RCP], [A path to a rcp-like command])
55    AC_PATH_PROG([RCP],  [rcp],  [/bin/false])
56    AC_DEFINE_UNQUOTED(RCP, "$RCP", [A path to a rcp-like command])
57
58    AC_ARG_VAR([SSH], [A path to a ssh-like command])
59    AC_PATH_PROG([SSH], [ssh], [/bin/false])
60    AC_DEFINE_UNQUOTED(SSH, "$SSH", [A path to a ssh-like command])
61    AC_ARG_VAR([SCP], [A path to a scp-like command])
62    AC_PATH_PROG([SCP],  [scp],  [/bin/false])
63    AC_DEFINE_UNQUOTED(SCP, "$SCP", [A path to a scp-like command])
64
65
66  else
67    WITH_LOCAL=no
68
69    AC_MSG_RESULT([no])
70
71  fi
72
73  AM_CONDITIONAL(WITH_LOCAL, test $WITH_LOCAL = yes)
74
75  localbatch_ok=$WITH_LOCAL
76  AC_SUBST(WITH_LOCAL)
77  AC_SUBST(RM)
78  AC_SUBST(SH)
79  AC_SUBST(CP)
80  AC_SUBST(RSH)
81  AC_SUBST(RCP)
82  AC_SUBST(SSH)
83  AC_SUBST(SCP)
84
85  dnl _CS_gbo Pour forcer l'utilisation du config.h, inclu
86  dnl par les fichiers Batch_BatchManager_Local_*.cxx 
87  dnl OWN_CONFIG_H=yes
88  dnl AC_SUBST(OWN_CONFIG_H)
89 ])
90