Salome HOME
Merge from V6_main 01/04/2013
[modules/jobmanager.git] / configure.ac
1 # Copyright (C) 2009-2013  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 # --
21 # Author : AndrĂ© RIBES (EDF)
22 # --
23 # -----------------------------------------------------------------------------
24 #
25 AC_INIT([JOBMANAGER project], [7.1.0], [andre.ribes@edf.fr], [JobManager-Module])
26 AC_CONFIG_AUX_DIR(m4)
27 AM_INIT_AUTOMAKE([tar-pax])
28 AC_CONFIG_HEADER(jobmanager_config.h)
29
30 # set up MODULE_NAME variable for dynamic construction of directories (resources, etc.)
31 MODULE_NAME=jobmanager
32 AC_SUBST(MODULE_NAME)
33
34 SHORT_VERSION=`echo $VERSION | awk -F. '{printf("%d.%d",$1,$2)}'`
35 AC_SUBST(SHORT_VERSION)
36 XVERSION=`echo $VERSION | awk -F. '{printf("0x%02x%02x%02x",$1,$2,$3)}'`
37 AC_SUBST(XVERSION)
38
39 RELEASE=$VERSION
40 AC_SUBST(RELEASE)
41
42 # This function return on stdout the absolute path of the filename in
43 # argument. Exemple:
44 # $ filename="../KERNEL_SRC/configure
45 # $ absfilename=`absolute_path $filename`
46 function absolute_path {
47     filename=$1
48     here=`pwd`
49     apath=`dirname $filename`
50     cd $apath
51     apath=`pwd`
52     cd $here
53     echo $apath
54 }
55
56 # Build directory, where the configure script is executed.
57 ROOT_BUILDDIR=`pwd`
58 # Source directory, where the configure script is located.
59 ROOT_SRCDIR=`absolute_path $0`
60
61 AC_SUBST(ROOT_SRCDIR)
62 AC_SUBST(ROOT_BUILDDIR)
63
64 echo
65 echo Source root directory : $ROOT_SRCDIR
66 echo Build  root directory : $ROOT_BUILDDIR
67
68 # -----------------------------------------------------------------------------
69
70 AC_ENABLE_DEBUG(yes)
71 AC_DISABLE_PRODUCTION
72
73 #Linker options
74 AC_CANONICAL_BUILD
75 AC_LINKER_OPTIONS
76
77 #Mandatory products
78 AC_PROG_CXX
79 AM_PROG_LIBTOOL
80 AC_CHECK_LIB(dl,dlopen)
81 I2_CHECK_QT4
82 AC_CHECK_OMNIORB
83 CHECK_BOOST
84
85 # Optional products
86 CHECK_SPHINX
87
88 AC_CHECK_KERNEL
89 CHECK_GUI(SALOME_Session_Server,SALOME_Session_Server)
90
91 AM_CONDITIONAL([SALOME_KERNEL], [test "x$KERNEL_ROOT_DIR" != "x"])
92 AM_CONDITIONAL([HAS_GUI], [test "x$GUI_ROOT_DIR" != "x"])
93
94 echo
95 echo
96 echo
97 echo "------------------------------------------------------------------------"
98 echo "$PACKAGE $VERSION"
99 echo "------------------------------------------------------------------------"
100 echo
101 echo "Configuration Options Summary:"
102 echo
103 echo "Mandatory products:"
104 echo "  Qt4 (graphic interface)  : $qt_ok"
105 echo "  OmniOrb (CORBA) ........ : $omniORB_ok"
106 echo "  Boost           ........ : $boost_ok"
107 echo "  SALOME KERNEL .......... : $Kernel_ok"
108 echo "  SALOME GUI ............. : $SalomeGUI_ok"
109 echo
110 echo "Optional products:"
111 echo "  Sphinx (user doc) ...... : $sphinx_ok"
112 echo
113 echo "------------------------------------------------------------------------"
114 echo
115
116 if test "x$omniORB_ok" = "xno"; then
117   AC_MSG_ERROR([OmniOrb is required],1)
118 fi
119 if test "x$qt_ok" = "xno"; then
120   AC_MSG_ERROR([Qt4 is required],1)
121 fi
122 if test "x$Kernel_ok" = "xno"; then
123   AC_MSG_ERROR([SALOME KERNEL is required],1)
124 fi
125 if test "x$SalomeGui_ok" = "xno"; then
126   AC_MSG_ERROR([SALOME GUI is required],1)
127 fi
128
129 AC_OUTPUT([ \
130   Makefile \
131   idl/Makefile \
132   src/Makefile \
133   src/bases/Makefile \
134   src/engine/Makefile \
135   src/genericgui/Makefile \
136   src/wrappers/Makefile \
137   src/standalone/Makefile \
138   src/standalone/start_jobmanager.sh \
139   src/salomegui/Makefile \
140   src/salomegui/JOBMANAGER_version.h \
141   src/salomegui/resources/SalomeApp.xml \
142   doc/Makefile \
143   doc/conf.py \
144 ])