Salome HOME
Initial commit
[modules/jobmanager.git] / configure.ac
1 #  Copyright (C) 2009  CEA/DEN, EDF R&D
2 #
3 #  This library is free software; you can redistribute it and/or
4 #  modify it under the terms of the GNU Lesser General Public
5 #  License as published by the Free Software Foundation; either
6 #  version 2.1 of the License.
7 #
8 #  This library is distributed in the hope that it will be useful,
9 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 #  Lesser General Public License for more details.
12 #
13 #  You should have received a copy of the GNU Lesser General Public
14 #  License along with this library; if not, write to the Free Software
15 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 #  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19 # --
20 # Author : AndrĂ© RIBES (EDF)
21 # --
22 # -----------------------------------------------------------------------------
23 #
24 AC_INIT([JOBMANAGER project], [0.1], [andre.ribes@edf.fr], [JobManager-Module])
25 AM_INIT_AUTOMAKE([tar-pax])
26 AC_CONFIG_HEADER(jobmanager_config.h)
27
28 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
29 MODULE_NAME=jobmanager
30 AC_SUBST(MODULE_NAME)
31
32 XVERSION=0x001
33 AC_SUBST(XVERSION)
34
35 RELEASE=$VERSION
36 AC_SUBST(RELEASE)
37
38 # This function return on stdout the absolute path of the filename in
39 # argument. Exemple:
40 # $ filename="../KERNEL_SRC/configure
41 # $ absfilename=`absolute_path $filename`
42 function absolute_path {
43     filename=$1
44     here=`pwd`
45     apath=`dirname $filename`
46     cd $apath
47     apath=`pwd`
48     cd $here
49     echo $apath
50 }
51
52 # Build directory, where the configure script is executed.
53 ROOT_BUILDDIR=`pwd`
54 # Source directory, where the configure script is located.
55 ROOT_SRCDIR=`absolute_path $0`
56
57 AC_SUBST(ROOT_SRCDIR)
58 AC_SUBST(ROOT_BUILDDIR)
59
60 echo
61 echo Source root directory : $ROOT_SRCDIR
62 echo Build  root directory : $ROOT_BUILDDIR
63
64 # -----------------------------------------------------------------------------
65
66 AC_ENABLE_DEBUG(yes)
67 AC_DISABLE_PRODUCTION
68
69 #Linker options
70 AC_CANONICAL_BUILD
71 AC_LINKER_OPTIONS
72
73 #Mandatory products
74 AC_PROG_CXX
75 AM_PROG_LIBTOOL
76 AC_CHECK_LIB(dl,dlopen)
77 I2_CHECK_QT4
78 AC_CHECK_OMNIORB
79
80 # Optional products
81 CHECK_SPHINX
82
83 AC_CHECK_KERNEL
84 CHECK_GUI(SALOME_Session_Server,SALOME_Session_Server)
85
86 AM_CONDITIONAL([SALOME_KERNEL], [test "x$KERNEL_ROOT_DIR" != "x"])
87 AM_CONDITIONAL([HAS_GUI], [test "x$GUI_ROOT_DIR" != "x"])
88
89 echo
90 echo
91 echo
92 echo "------------------------------------------------------------------------"
93 echo "$PACKAGE $VERSION"
94 echo "------------------------------------------------------------------------"
95 echo
96 echo "Configuration Options Summary:"
97 echo
98 echo "Mandatory products:"
99 echo "  Qt4 (graphic interface)  : $qt_ok"
100 echo "  OmniOrb (CORBA) ........ : $omniORB_ok"
101 echo "  SALOME KERNEL .......... : $Kernel_ok"
102 echo "  SALOME GUI ............. : $SalomeGUI_ok"
103 echo
104 echo "Optional products:"
105 echo "  Sphinx (user doc) ...... : $sphinx_ok"
106 echo
107 echo "------------------------------------------------------------------------"
108 echo
109
110 if test "x$omniORB_ok" = "xno"; then
111   AC_MSG_ERROR([OmniOrb is required],1)
112 fi
113 if test "x$qt_ok" = "xno"; then
114   AC_MSG_ERROR([Qt4 is required],1)
115 fi
116 if test "x$Kernel_ok" = "xno"; then
117   AC_MSG_ERROR([SALOME KERNEL is required],1)
118 fi
119 if test "x$SalomeGui_ok" = "xno"; then
120   AC_MSG_ERROR([SALOME GUI is required],1)
121 fi
122
123 AC_OUTPUT([ \
124   Makefile \
125   src/Makefile \
126   src/bases/Makefile \
127   src/engine/Makefile \
128   src/genericgui/Makefile \
129   src/wrappers/Makefile \
130   src/standalone/Makefile \
131   src/standalone/start_jobmanager.sh \
132   src/salomegui/Makefile \
133 ])