1 # aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
3 # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
15 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
17 dnl This library is free software; you can redistribute it and/or
18 dnl modify it under the terms of the GNU Lesser General Public
19 dnl License as published by the Free Software Foundation; either
20 dnl version 2.1 of the License.
22 dnl This library is distributed in the hope that it will be useful,
23 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
24 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 dnl Lesser General Public License for more details.
27 dnl You should have received a copy of the GNU Lesser General Public
28 dnl License along with this library; if not, write to the Free Software
29 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
31 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
36 dnl AC_ENABLE_PRODUCTION AC_DISABLE_PRODUCTION
38 dnl AC_ENABLE_DEBUG AC_DISABLE_DEBUG
41 dnl author Patrick GOLDBRONN
44 # AC_ENABLE_PRODUCTION
45 AC_DEFUN(AC_ENABLE_PRODUCTION, [dnl
46 define([AC_ENABLE_PRODUCTION_DEFAULT], ifelse($1, no, no, yes))dnl
47 AC_ARG_ENABLE(production,
48 changequote(<<, >>)dnl
49 << --enable-production[=PKGS] build without debug information [default=>>AC_ENABLE_PRODUCTION_DEFAULT],
53 yes) enable_production=yes ;;
54 no) enable_production=no ;;
57 # Look at the argument we got. We use all the common list separators.
58 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
59 for pkg in $enableval; do
60 if test "X$pkg" = "X$p"; then
67 enable_production=AC_ENABLE_PRODUCTION_DEFAULT)dnl
69 if test "X$enable_production" = "Xyes"; then
71 CXXFLAGS="$CXXFLAGS -O -Wno-deprecated "
75 # AC_DISABLE_PRODUCTION - set the default flag to --disable-production
76 AC_DEFUN(AC_DISABLE_PRODUCTION, [AC_ENABLE_PRODUCTION(no)])
79 AC_DEFUN(AC_ENABLE_DEBUG, [dnl
80 define([AC_ENABLE_DEBUG_DEFAULT], ifelse($1, no, no, yes))dnl
82 changequote(<<, >>)dnl
83 << --enable-debug[=PKGS] build without debug information [default=>>AC_ENABLE_DEBUG_DEFAULT],
87 yes) enable_debug=yes ;;
88 no) enable_debug=no ;;
91 # Look at the argument we got. We use all the common list separators.
92 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
93 for pkg in $enableval; do
94 if test "X$pkg" = "X$p"; then
101 enable_debug=AC_ENABLE_DEBUG_DEFAULT)dnl
103 if test "X$enable_debug" = "Xyes"; then
104 CFLAGS="$CFLAGS -g -D_DEBUG_ "
105 CXXFLAGS="$CXXFLAGS -g -D_DEBUG_ -Wno-deprecated "
109 # AC_DISABLE_DEBUG - set the default flag to --disable-debug
110 AC_DEFUN(AC_DISABLE_DEBUG, [AC_ENABLE_DEBUG(no)])
114 # serial 40 AC_PROG_LIBTOOL
115 AC_DEFUN(AC_PROG_LIBTOOL,
116 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
118 # Save cache, so that ltconfig can load it
121 # Actually configure libtool. ac_aux_dir is where install-sh is found.
122 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
123 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
124 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
125 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
126 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
127 $libtool_flags $ac_aux_dir/ltmain.sh $lt_target \
128 || AC_MSG_ERROR([libtool configure failed])
130 # Reload cache, that may have been modified by ltconfig
133 # This can be used to rebuild libtool when needed
134 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
136 # Always use our own libtool.
137 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
140 # Redirect the config.log output again, so that the ltconfig log is not
141 # clobbered by the next message.
145 AC_DEFUN(AC_LIBTOOL_SETUP,
147 AC_REQUIRE([AC_ENABLE_SHARED])dnl
148 AC_REQUIRE([AC_ENABLE_STATIC])dnl
149 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
150 AC_REQUIRE([AC_CANONICAL_HOST])dnl
151 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
152 AC_REQUIRE([AC_PROG_RANLIB])dnl
153 AC_REQUIRE([AC_PROG_CC])dnl
154 AC_REQUIRE([AC_PROG_LD])dnl
155 AC_REQUIRE([AC_PROG_NM])dnl
156 AC_REQUIRE([AC_PROG_LN_S])dnl
160 NONE) lt_target="$host" ;;
161 *) lt_target="$target" ;;
164 # Check for any special flags to pass to ltconfig.
166 # the following will cause an existing older ltconfig to fail, so
167 # we ignore this at the expense of the cache file... Checking this
168 # will just take longer ... bummer!
169 #libtool_flags="--cache-file=$cache_file"
171 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
172 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
173 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
174 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
175 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
176 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
177 [libtool_flags="$libtool_flags --enable-dlopen"])
178 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
179 [libtool_flags="$libtool_flags --enable-win32-dll"])
180 AC_ARG_ENABLE(libtool-lock,
181 [ --disable-libtool-lock avoid locking (might break parallel builds)])
182 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
183 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
185 # Some flags need to be propagated to the compiler or linker for good
189 # Find out which ABI we are using.
190 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
191 if AC_TRY_EVAL(ac_compile); then
192 case "`/usr/bin/file conftest.o`" in
208 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
209 SAVE_CFLAGS="$CFLAGS"
210 CFLAGS="$CFLAGS -belf"
211 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
212 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
213 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
214 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
215 CFLAGS="$SAVE_CFLAGS"
219 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
220 [*-*-cygwin* | *-*-mingw*)
221 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
222 AC_CHECK_TOOL(AS, as, false)
223 AC_CHECK_TOOL(OBJDUMP, objdump, false)
229 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
230 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
232 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
233 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
235 # AC_ENABLE_SHARED - implement the --enable-shared flag
236 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
237 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
239 AC_DEFUN(AC_ENABLE_SHARED, [dnl
240 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
241 AC_ARG_ENABLE(shared,
242 changequote(<<, >>)dnl
243 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
245 [p=${PACKAGE-default}
247 yes) enable_shared=yes ;;
248 no) enable_shared=no ;;
251 # Look at the argument we got. We use all the common list separators.
252 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
253 for pkg in $enableval; do
254 if test "X$pkg" = "X$p"; then
261 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
264 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
265 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
266 AC_ENABLE_SHARED(no)])
268 # AC_ENABLE_STATIC - implement the --enable-static flag
269 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
270 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
272 AC_DEFUN(AC_ENABLE_STATIC, [dnl
273 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
274 AC_ARG_ENABLE(static,
275 changequote(<<, >>)dnl
276 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
278 [p=${PACKAGE-default}
280 yes) enable_static=yes ;;
281 no) enable_static=no ;;
284 # Look at the argument we got. We use all the common list separators.
285 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
286 for pkg in $enableval; do
287 if test "X$pkg" = "X$p"; then
294 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
297 # AC_DISABLE_STATIC - set the default static flag to --disable-static
298 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
299 AC_ENABLE_STATIC(no)])
302 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
303 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
304 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
306 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
307 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
308 AC_ARG_ENABLE(fast-install,
309 changequote(<<, >>)dnl
310 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
312 [p=${PACKAGE-default}
314 yes) enable_fast_install=yes ;;
315 no) enable_fast_install=no ;;
317 enable_fast_install=no
318 # Look at the argument we got. We use all the common list separators.
319 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
320 for pkg in $enableval; do
321 if test "X$pkg" = "X$p"; then
322 enable_fast_install=yes
328 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
331 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
332 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
333 AC_ENABLE_FAST_INSTALL(no)])
335 # AC_PROG_LD - find the path to the GNU or non-GNU linker
338 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
339 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
340 AC_REQUIRE([AC_PROG_CC])dnl
341 AC_REQUIRE([AC_CANONICAL_HOST])dnl
342 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
344 if test "$ac_cv_prog_gcc" = yes; then
345 # Check if gcc -print-prog-name=ld gives a path.
346 AC_MSG_CHECKING([for ld used by GCC])
347 ac_prog=`($CC -print-prog-name=ld) 2>&5`
349 # Accept absolute paths.
351 [\\/]* | [A-Za-z]:[\\/]*)
352 re_direlt='/[^/][^/]*/\.\./'
354 # Canonicalize the path of ld
355 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
356 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
357 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
359 test -z "$LD" && LD="$ac_prog"
362 # If it fails, then pretend we aren't using GCC.
366 # If it is relative, then search for the first ld in PATH.
370 elif test "$with_gnu_ld" = yes; then
371 AC_MSG_CHECKING([for GNU ld])
373 AC_MSG_CHECKING([for non-GNU ld])
375 AC_CACHE_VAL(ac_cv_path_LD,
376 [if test -z "$LD"; then
377 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
378 for ac_dir in $PATH; do
379 test -z "$ac_dir" && ac_dir=.
380 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
381 ac_cv_path_LD="$ac_dir/$ac_prog"
382 # Check to see if the program is GNU ld. I'd rather use --version,
383 # but apparently some GNU ld's only accept -v.
384 # Break only if it was the GNU/non-GNU ld that we prefer.
385 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
386 test "$with_gnu_ld" != no && break
388 test "$with_gnu_ld" != yes && break
394 ac_cv_path_LD="$LD" # Let the user override the test with a path.
397 if test -n "$LD"; then
402 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
406 AC_DEFUN(AC_PROG_LD_GNU,
407 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
408 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
409 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
410 ac_cv_prog_gnu_ld=yes
416 # AC_PROG_NM - find the path to a BSD-compatible name lister
418 [AC_MSG_CHECKING([for BSD-compatible nm])
419 AC_CACHE_VAL(ac_cv_path_NM,
420 [if test -n "$NM"; then
421 # Let the user override the test.
424 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
425 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
426 test -z "$ac_dir" && ac_dir=.
427 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
428 # Check to see if the nm accepts a BSD-compat flag.
429 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
430 # nm: unknown option "B" ignored
431 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
432 ac_cv_path_NM="$ac_dir/nm -B"
434 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
435 ac_cv_path_NM="$ac_dir/nm -p"
438 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
439 continue # so that we can try to find one that supports BSD flags
444 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
450 # AC_CHECK_LIBM - check for math library
451 AC_DEFUN(AC_CHECK_LIBM,
452 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
455 *-*-beos* | *-*-cygwin*)
456 # These system don't have libm
459 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
460 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
463 AC_CHECK_LIB(m, main, LIBM="-lm")
468 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
469 # the libltdl convenience library and INCLTDL to the include flags for
470 # the libltdl header and adds --enable-ltdl-convenience to the
471 # configure arguments. Note that LIBLTDL and INCLTDL are not
472 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
473 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
474 # with '${top_builddir}/' and INCLTDL will be prefixed with
475 # '${top_srcdir}/' (note the single quotes!). If your package is not
476 # flat and you're not using automake, define top_builddir and
477 # top_srcdir appropriately in the Makefiles.
478 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
479 case "$enable_ltdl_convenience" in
480 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
481 "") enable_ltdl_convenience=yes
482 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
484 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
485 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
488 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
489 # the libltdl installable library and INCLTDL to the include flags for
490 # the libltdl header and adds --enable-ltdl-install to the configure
491 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
492 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
493 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
494 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
495 # with '${top_srcdir}/' (note the single quotes!). If your package is
496 # not flat and you're not using automake, define top_builddir and
497 # top_srcdir appropriately in the Makefiles.
498 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
499 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
500 AC_CHECK_LIB(ltdl, main,
501 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
502 [if test x"$enable_ltdl_install" = xno; then
503 AC_MSG_WARN([libltdl not installed, but installation disabled])
505 enable_ltdl_install=yes
508 if test x"$enable_ltdl_install" = x"yes"; then
509 ac_configure_args="$ac_configure_args --enable-ltdl-install"
510 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
511 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
513 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
520 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
521 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
522 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
523 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
524 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
525 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
526 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
528 dnl This is just to silence aclocal about the macro not being used
529 ifelse([AC_DISABLE_FAST_INSTALL])dnl
531 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
532 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
534 dnl This library is free software; you can redistribute it and/or
535 dnl modify it under the terms of the GNU Lesser General Public
536 dnl License as published by the Free Software Foundation; either
537 dnl version 2.1 of the License.
539 dnl This library is distributed in the hope that it will be useful,
540 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
541 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
542 dnl Lesser General Public License for more details.
544 dnl You should have received a copy of the GNU Lesser General Public
545 dnl License along with this library; if not, write to the Free Software
546 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
548 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
552 dnl @synopsis AC_C_DEPEND_FLAG
554 dnl define C_DEPEND_FLAG
555 dnl define CXX_DEPEND_FLAG
558 dnl @author Marc Tajchman
560 AC_DEFUN(AC_DEPEND_FLAG,
561 [AC_CACHE_CHECK(which flag for dependency information generation,
565 echo "conftest.o: conftest.c" > conftest.verif
566 echo "int main() { return 0; }" > conftest.c
569 for ac_C_DEPEND_FLAG in -xM -MM -M ; do
571 rm -f conftest.d conftest.err
572 ${CC-cc} ${ac_C_DEPEND_FLAG} -c conftest.c 1> conftest.d 2> conftest.err
573 if test -f conftest.u ; then
574 mv conftest.u conftest.d
578 diff -b -B conftest.d conftest.verif > conftest
579 if test ! -s conftest ; then
580 C_DEPEND_FLAG=${ac_C_DEPEND_FLAG}
585 dnl use gcc option -MG : asume unknown file will be construct later
586 rm -f conftest.d conftest.err
587 ${CC-cc} ${C_DEPEND_FLAG} -MG -c conftest.c 1> conftest.d 2> conftest.err
588 if test -f conftest.u ; then
589 mv conftest.u conftest.d
592 diff -b -B conftest.d conftest.verif > conftest
593 if test ! -s conftest ; then
594 C_DEPEND_FLAG=${C_DEPEND_FLAG}" -MG"
598 if test "x${C_DEPEND_FLAG}" = "x" ; then
599 echo "cannot determine flag (C language)"
603 echo -n " C : " ${C_DEPEND_FLAG}
606 echo "conftest.o: conftest.cxx" > conftest.verif
607 echo "int main() { return 0; }" > conftest.cxx
610 for ac_CXX_DEPEND_FLAG in -xM -MM -M ; do
612 rm -f conftest.d conftest.err
613 ${CXX-c++} ${ac_CXX_DEPEND_FLAG} -c conftest.cxx 1> conftest.d 2> conftest.err
614 if test -f conftest.u ; then
615 mv conftest.u conftest.d
619 diff -b -B conftest.d conftest.verif > conftest
620 if test ! -s conftest ; then
621 CXX_DEPEND_FLAG=${ac_CXX_DEPEND_FLAG}
626 dnl use g++ option -MG : asume unknown file will be construct later
627 rm -f conftest.d conftest.err
628 ${CXX-c++} ${CXX_DEPEND_FLAG} -MG -c conftest.cxx 1> conftest.d 2> conftest.err
629 if test -f conftest.u ; then
630 mv conftest.u conftest.d
633 diff -b -B conftest.d conftest.verif > conftest
634 if test ! -s conftest ; then
635 CXX_DEPEND_FLAG=${CXX_DEPEND_FLAG}" -MG"
640 if test "x${CXX_DEPEND_FLAG}" = "x" ; then
641 echo "cannot determine flag (C++ language)"
645 echo -n " C++ : " ${CXX_DEPEND_FLAG}
648 AC_SUBST(C_DEPEND_FLAG)
649 AC_SUBST(CXX_DEPEND_FLAG)
653 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
654 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
656 dnl This library is free software; you can redistribute it and/or
657 dnl modify it under the terms of the GNU Lesser General Public
658 dnl License as published by the Free Software Foundation; either
659 dnl version 2.1 of the License.
661 dnl This library is distributed in the hope that it will be useful,
662 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
663 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
664 dnl Lesser General Public License for more details.
666 dnl You should have received a copy of the GNU Lesser General Public
667 dnl License along with this library; if not, write to the Free Software
668 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
670 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
674 dnl @synopsis AC_CXX_HAVE_SSTREAM
676 dnl If the C++ library has a working stringstream, define HAVE_SSTREAM.
678 dnl @author Ben Stanley
681 dnl modified by Marc Tajchman (CEA) - 10/10/2002
683 AC_DEFUN([AC_CXX_HAVE_SSTREAM],
684 [AC_CACHE_CHECK(whether the compiler has stringstream,
686 [AC_REQUIRE([AC_CXX_NAMESPACES])
689 AC_TRY_COMPILE([#include <sstream>
690 #ifdef HAVE_NAMESPACES
692 #endif],[stringstream message; message << "Hello"; return 0;],
693 HAVE_SSTREAM=yes, HAVE_SSTREAM=no)
696 AC_SUBST(HAVE_SSTREAM)
699 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
700 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
702 dnl This library is free software; you can redistribute it and/or
703 dnl modify it under the terms of the GNU Lesser General Public
704 dnl License as published by the Free Software Foundation; either
705 dnl version 2.1 of the License.
707 dnl This library is distributed in the hope that it will be useful,
708 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
709 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
710 dnl Lesser General Public License for more details.
712 dnl You should have received a copy of the GNU Lesser General Public
713 dnl License along with this library; if not, write to the Free Software
714 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
716 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
720 dnl @synopsis AC_CXX_NAMESPACES
722 dnl If the compiler can prevent names clashes using namespaces, define
726 dnl @author Luc Maisonobe
728 AC_DEFUN(AC_CXX_NAMESPACES,
729 [AC_CACHE_CHECK(whether the compiler implements namespaces,
730 ac_cv_cxx_namespaces,
733 AC_TRY_COMPILE([namespace Outer { namespace Inner { int i = 0; }}],
734 [using namespace Outer::Inner; return i;],
735 ac_cv_cxx_namespaces=yes, ac_cv_cxx_namespaces=no)
738 if test "$ac_cv_cxx_namespaces" = yes; then
739 AC_DEFINE(HAVE_NAMESPACES,,[define if the compiler implements namespaces])
743 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
744 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
746 dnl This library is free software; you can redistribute it and/or
747 dnl modify it under the terms of the GNU Lesser General Public
748 dnl License as published by the Free Software Foundation; either
749 dnl version 2.1 of the License.
751 dnl This library is distributed in the hope that it will be useful,
752 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
753 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
754 dnl Lesser General Public License for more details.
756 dnl You should have received a copy of the GNU Lesser General Public
757 dnl License along with this library; if not, write to the Free Software
758 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
760 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
764 AC_DEFUN([CHECK_BOOST],[
766 AC_CHECKING(for BOOST Library)
771 AC_SUBST(BOOST_CPPFLAGS)
775 if test -z ${BOOSTDIR}; then
776 AC_MSG_WARN(You must provide BOOSTDIR variable)
778 AC_MSG_RESULT(\$BOOSTDIR = ${BOOSTDIR})
779 AC_CHECKING(for boost/shared_ptr.hpp header file)
781 CPPFLAGS_old="${CPPFLAGS}"
782 BOOST_CPPFLAGS="-ftemplate-depth-32 -I${BOOSTDIR}"
783 CPPFLAGS="${CPPFLAGS} ${BOOST_CPPFLAGS}"
785 AC_CHECK_HEADER(boost/shared_ptr.hpp,boost_ok=yes,boost_ok=no)
787 CPPFLAGS="${CPPFLAGS_old}"
797 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
798 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
800 dnl This library is free software; you can redistribute it and/or
801 dnl modify it under the terms of the GNU Lesser General Public
802 dnl License as published by the Free Software Foundation; either
803 dnl version 2.1 of the License.
805 dnl This library is distributed in the hope that it will be useful,
806 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
807 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
808 dnl Lesser General Public License for more details.
810 dnl You should have received a copy of the GNU Lesser General Public
811 dnl License along with this library; if not, write to the Free Software
812 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
814 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
819 AC_DEFUN([CHECK_MPICH],[
821 AC_REQUIRE([AC_PROG_CC])dnl
824 --with-mpich=DIR root directory path of MPICH installation,
825 WITHMPICH="yes",WITHMPICH="no")
829 if test "$WITHMPICH" = yes; then
832 echo ---------------------------------------------
834 echo ---------------------------------------------
838 if test "$MPICH_HOME"; then
839 MPICH_INCLUDES="-I$MPICH_HOME/include"
840 MPICH_LIBS="-L$MPICH_HOME/lib"
843 CPPFLAGS_old="$CPPFLAGS"
844 CPPFLAGS="$MPICH_INCLUDES $CPPFLAGS"
845 AC_CHECK_HEADER(mpi.h,WITHMPICH="yes",WITHMPICH="no")
846 CPPFLAGS="$CPPFLAGS_old"
848 if test "$WITHMPICH" = "yes";then
849 LDFLAGS_old="$LDFLAGS"
850 LDFLAGS="$MPICH_LIBS $LDFLAGS"
851 AC_CHECK_LIB(mpich,MPI_Init,
852 AC_CHECK_LIB(pmpich, PMPI_Init,WITHMPICH="yes",WITHMPICH="no"),
854 LDFLAGS="$LDFLAGS_old"
857 MPICH_LIBS="$MPICH_LIBS -lpmpich -lmpich"
860 AC_SUBST(MPICH_INCLUDES)
866 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
867 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
869 dnl This library is free software; you can redistribute it and/or
870 dnl modify it under the terms of the GNU Lesser General Public
871 dnl License as published by the Free Software Foundation; either
872 dnl version 2.1 of the License.
874 dnl This library is distributed in the hope that it will be useful,
875 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
876 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
877 dnl Lesser General Public License for more details.
879 dnl You should have received a copy of the GNU Lesser General Public
880 dnl License along with this library; if not, write to the Free Software
881 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
883 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
888 dnl CHECK_PYTHON([module, classes])
890 dnl Adds support for distributing Python modules or classes.
891 dnl Python library files distributed as a `module' are installed
892 dnl under PYTHON_SITE_PACKAGE (eg, ./python1.5/site-package/package-name)
893 dnl while those distributed as `classes' are installed under PYTHON_SITE
894 dnl (eg, ./python1.5/site-packages). The default is to install as
897 AC_DEFUN(CHECK_PYTHON,
900 [ --with-python=DIR root directory path of python installation ],
901 [PYTHON="$withval/bin/python"
902 AC_MSG_RESULT("select python distribution in $withval")
904 AC_PATH_PROG(PYTHON, python)
907 AC_CHECKING([local Python configuration])
908 PYTHON_PREFIX=`echo $PYTHON | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
909 PYTHON_PREFIX=`echo $PYTHON_PREFIX | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
910 PYTHONHOME=$PYTHON_PREFIX
912 AC_SUBST(PYTHON_PREFIX)
915 changequote(<<, >>)dnl
916 PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[:3]"`
918 AC_SUBST(PYTHON_VERSION)
920 PY_MAKEFILE=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/config/Makefile
921 if test ! -f "$PY_MAKEFILE"; then
922 AC_MSG_ERROR([*** Couldn't find ${PY_MAKEFILE}. Maybe you are
923 *** missing the development portion of the python installation])
926 AC_SUBST(PYTHON_INCLUDES)
927 AC_SUBST(PYTHON_LIBS)
929 PYTHON_INCLUDES=-I$PYTHON_PREFIX/include/python$PYTHON_VERSION
930 PYTHON_LIBS="-L${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}/config -lpython${PYTHON_VERSION}"
931 PYTHON_LIB=$PYTHON_LIBS
932 PYTHON_LIBA=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/config/libpython$PYTHON_VERSION.a
934 dnl At times (like when building shared libraries) you may want
935 dnl to know which OS Python thinks this is.
937 AC_SUBST(PYTHON_PLATFORM)
938 PYTHON_PLATFORM=`$PYTHON -c "import sys; print sys.platform"`
940 AC_SUBST(PYTHON_SITE)
941 AC_ARG_WITH(python-site,
942 [ --with-python-site=DIR Use DIR for installing platform independent
943 Python site-packages],
945 dnl modification : by default, we install python script in salome root tree
947 dnl [PYTHON_SITE="$withval"
948 dnl python_site_given=yes],
949 dnl [PYTHON_SITE=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION/site-packages
950 dnl python_site_given=no])
952 [PYTHON_SITE="$withval"
953 python_site_given=yes],
954 [PYTHON_SITE=$prefix"/lib/python"$PYTHON_VERSION/site-packages
955 python_site_given=no])
957 AC_SUBST(PYTHON_SITE_PACKAGE)
958 PYTHON_SITE_PACKAGE=$PYTHON_SITE/$PACKAGE
961 dnl Get PYTHON_SITE from --with-python-site-exec or from
962 dnl --with-python-site or from running Python
964 AC_SUBST(PYTHON_SITE_EXEC)
965 AC_ARG_WITH(python-site-exec,
966 [ --with-python-site-exec=DIR Use DIR for installing platform dependent
967 Python site-packages],
968 [PYTHON_SITE_EXEC="$withval"],
969 [if test "$python_site_given" = yes; then
970 PYTHON_SITE_EXEC=$PYTHON_SITE
972 PYTHON_SITE_EXEC=$PYTHON_EXEC_PREFIX"/lib/python"$PYTHON_VERSION/site-packages
975 dnl Set up the install directory
977 [PYTHON_SITE_INSTALL=$PYTHON_SITE],
978 [PYTHON_SITE_INSTALL=$PYTHON_SITE_PACKAGE])
979 AC_SUBST(PYTHON_SITE_INSTALL)
981 dnl Also lets automake think PYTHON means something.
983 pythondir=$PYTHON_PREFIX"/lib/python"$PYTHON_VERSION/
986 AC_MSG_CHECKING([if we need libdb])
987 PY_NEEDOPENDB=`nm $PYTHON_LIBA | grep dbopen | grep U`
988 if test "x$PY_NEEDOPENDB" != "x"; then
989 PYTHON_LIBS="$PYTHON_LIBS -ldb"
995 AC_MSG_CHECKING([if we need libdl])
996 PY_NEEDOPENDL=`nm $PYTHON_LIBA | grep dlopen | grep U`
997 if test "x$PY_NEEDOPENDL" != "x"; then
998 PYTHON_LIBS="$PYTHON_LIBS -ldl"
1004 AC_MSG_CHECKING([if we need libutil])
1005 PY_NEEDOPENPTY=`nm $PYTHON_LIBA | grep openpty | grep U`
1006 if test "x$PY_NEEDOPENPTY" != "x"; then
1007 PYTHON_LIBS="$PYTHON_LIBS -lutil"
1013 AC_MSG_CHECKING([if we need tcltk])
1014 PY_NEEDTCLTK=`nm $PYTHON_LIBA | grep Tcl_Init | grep U`
1015 if test "x$PY_NEEDTCLTK" != "x"; then
1016 PYTHON_LIBS="$PYTHON_LIBS -ltcl -ltk"
1023 AC_MSG_RESULT(looks good)])
1025 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
1026 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
1028 dnl This library is free software; you can redistribute it and/or
1029 dnl modify it under the terms of the GNU Lesser General Public
1030 dnl License as published by the Free Software Foundation; either
1031 dnl version 2.1 of the License.
1033 dnl This library is distributed in the hope that it will be useful,
1034 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
1035 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1036 dnl Lesser General Public License for more details.
1038 dnl You should have received a copy of the GNU Lesser General Public
1039 dnl License along with this library; if not, write to the Free Software
1040 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1042 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
1047 AC_DEFUN([CHECK_SWIG],[
1048 AC_REQUIRE([CHECK_PYTHON])dnl
1053 [ --with-swig=EXEC swig executable ],
1055 AC_MSG_RESULT("select $withval as swig executable")
1057 AC_PATH_PROG(SWIG, swig)
1060 if test "x$SWIG" = "x"
1063 AC_MSG_RESULT(swig not in PATH variable)
1066 if test "x$swig_ok" = "xyes"
1068 AC_MSG_CHECKING(python wrapper generation with swig)
1069 cat > conftest.h << EOF
1073 $SWIG -module conftest -python conftest.h >/dev/null 2>&1
1074 if test -f conftest_wrap.c
1076 SWIG_FLAGS="-c++ -python -shadow"
1081 AC_MSG_RESULT($swig_ok)
1084 AC_SUBST(SWIG_FLAGS)
1087 AC_MSG_RESULT(for swig: $swig_ok)
1092 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
1093 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
1095 dnl This library is free software; you can redistribute it and/or
1096 dnl modify it under the terms of the GNU Lesser General Public
1097 dnl License as published by the Free Software Foundation; either
1098 dnl version 2.1 of the License.
1100 dnl This library is distributed in the hope that it will be useful,
1101 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
1102 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1103 dnl Lesser General Public License for more details.
1105 dnl You should have received a copy of the GNU Lesser General Public
1106 dnl License along with this library; if not, write to the Free Software
1107 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1109 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
1113 dnl@synopsis ENABLE_PTHREADS
1115 dnl modify CFLAGS, CXXFLAGS and LIBS for compiling pthread-based programs.
1117 dnl@author (C) Ruslan Shevchenko <Ruslan@Shevchenko.Kiev.UA>, 1998, 2000
1121 AC_DEFUN([ENABLE_PTHREADS],[
1122 AC_REQUIRE([CHECK_PTHREADS])
1124 if test -z "$enable_pthreads_done"
1126 CFLAGS="$CFLAGS $CFLAGS_PTHREADS"
1127 CXXFLAGS="$CXXFLAGS $CXXFLAGS_PTHREADS"
1128 LIBS="$LIBS $LIBS_PTHREADS"
1130 enable_pthreads_done=yes
1134 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
1135 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
1137 dnl This library is free software; you can redistribute it and/or
1138 dnl modify it under the terms of the GNU Lesser General Public
1139 dnl License as published by the Free Software Foundation; either
1140 dnl version 2.1 of the License.
1142 dnl This library is distributed in the hope that it will be useful,
1143 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
1144 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1145 dnl Lesser General Public License for more details.
1147 dnl You should have received a copy of the GNU Lesser General Public
1148 dnl License along with this library; if not, write to the Free Software
1149 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1151 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
1155 #@synonpsis CHECK_PTHREADS
1156 dnl check for pthreads system interfaces.
1157 dnl set CFLAGS_PTHREADS, CXXFLAGS_PTHREADS and LIBS_PTHREADS to
1158 dnl flags to compiler flags for multithread program compilation (if exists),
1159 dnl and library, if one required.
1161 dnl@author (C) Ruslan Shevchenko <Ruslan@Shevchenko.Kiev.UA>, 1998
1163 dnl ----------------------------------------------------------------
1165 AC_DEFUN(CHECK_PTHREADS,[
1166 AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl
1167 AC_CHECK_HEADER(pthread.h,AC_DEFINE(HAVE_PTHREAD_H))
1168 AC_CHECK_LIB(posix4,nanosleep, LIBS_PTHREADS="-lposix4",LIBS_PTHREADS="")
1169 AC_CHECK_LIB(pthread,pthread_mutex_lock,
1170 LIBS_PTHREADS="-lpthread $LIBS_PTHREADS")
1171 AC_MSG_CHECKING([parameters for using pthreads])
1174 CFLAGS_PTHREADS="-pthread"
1175 CXXFLAGS_PTHREADS="-pthread"
1180 AC_MSG_RESULT(["flags: $CFLAGS_PTHREADS\;libs: $LIBS_PTHREADS"])
1187 AC_DEFUN([CHECK_OMNIORB],[
1188 AC_REQUIRE([AC_PROG_CC])dnl
1189 AC_REQUIRE([AC_PROG_CXX])dnl
1190 AC_REQUIRE([AC_PROG_CPP])dnl
1191 AC_REQUIRE([AC_PROG_CXXCPP])dnl
1193 AC_CHECKING(for omniORB)
1196 if test "x$PYTHON" = "x"
1204 AC_PATH_PROG(OMNIORB_IDL, omniidl)
1205 if test "xOMNIORB_IDL" = "x"
1208 AC_MSG_RESULT(omniORB binaries not in PATH variable)
1213 if test "x$omniORB_ok" = "xyes"
1215 AC_SUBST(OMNIORB_IDL)
1217 OMNIORB_BIN=`echo ${OMNIORB_IDL} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
1218 OMNIORB_LIB=`echo ${OMNIORB_BIN} | sed -e "s,bin,lib,"`
1220 OMNIORB_ROOT=`echo ${OMNIORB_BIN} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
1221 OMNIORB_ROOT=`echo ${OMNIORB_ROOT} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
1222 AC_SUBST(OMNIORB_ROOT)
1224 OMNIORB_INCLUDES="-I$OMNIORB_ROOT/include -I$OMNIORB_ROOT/include/omniORB3 -I$OMNIORB_ROOT/include/COS"
1225 dnl OMNIORB_INCLUDES="-I$OMNIORB_ROOT/include -I$OMNIORB_ROOT/include/omniORB4 -I$OMNIORB_ROOT/include/COS"
1226 AC_SUBST(OMNIORB_INCLUDES)
1233 AC_DEFINE(__sparc__)
1234 OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__sparc__"
1238 OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__x86__"
1243 AC_DEFINE(__sunos__)
1245 AC_DEFINE(__OSVERSION__)
1246 OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__sunos__"
1249 AC_DEFINE(__linux__)
1251 AC_DEFINE(__OSVERSION__)
1252 OMNIORB_CXXFLAGS="$OMNIORB_CXXFLAGS -D__linux__"
1255 AC_SUBST(OMNIORB_CXXFLAGS)
1257 CPPFLAGS_old=$CPPFLAGS
1258 CPPFLAGS="$CPPFLAGS $OMNIORB_CXXFLAGS $OMNIORB_INCLUDES"
1261 AC_CHECK_HEADER(CORBA.h,omniORB_ok="yes",omniORB_ok="no")
1263 CPPFLAGS=$CPPFLAGS_old
1269 if test "x$omniORB_ok" = "xyes"
1271 OMNIORB_LDFLAGS="-L$OMNIORB_LIB"
1274 LIBS="$LIBS $OMNIORB_LDFLAGS -lomnithread"
1276 CXXFLAGS_old=$CXXFLAGS
1277 CXXFLAGS="$CXXFLAGS $OMNIORB_CXXFLAGS $OMNIORB_INCLUDES"
1279 AC_MSG_CHECKING(whether we can link with omnithreads)
1280 AC_CACHE_VAL(salome_cv_lib_omnithreads,[
1282 #include <omnithread.h>
1283 , omni_mutex my_mutex,
1284 eval "salome_cv_lib_omnithreads=yes",eval "salome_cv_lib_omnithreads=no")
1287 omniORB_ok="$salome_cv_lib_omnithreads"
1288 if test "x$omniORB_ok" = "xno"
1290 AC_MSG_RESULT(omnithreads not found)
1296 CXXFLAGS=$CXXFLAGS_old
1301 if test "x$omniORB_ok" = "xyes"
1304 AC_CHECK_LIB(socket,socket, LIBS="-lsocket $LIBS",,)
1305 AC_CHECK_LIB(nsl,gethostbyname, LIBS="-lnsl $LIBS",,)
1308 OMNIORB_LIBS="$OMNIORB_LDFLAGS -lomniORB3 -ltcpwrapGK -lomniDynamic3 -lomnithread -lCOS3 -lCOSDynamic3"
1309 dnl OMNIORB_LIBS="$OMNIORB_LDFLAGS -lomniORB4 -lomniDynamic4 -lomnithread -lCOS4 -lCOSDynamic4"
1310 AC_SUBST(OMNIORB_LIBS)
1312 LIBS="$OMNIORB_LIBS $LIBS"
1313 CXXFLAGS_old=$CXXFLAGS
1314 CXXFLAGS="$CXXFLAGS $OMNIORB_CXXFLAGS $OMNIORB_INCLUDES"
1316 AC_MSG_CHECKING(whether we can link with omniORB3)
1317 AC_CACHE_VAL(salome_cv_lib_omniorb3,[
1320 , CORBA::ORB_var orb,
1321 eval "salome_cv_lib_omniorb3=yes",eval "salome_cv_lib_omniorb3=no")
1323 omniORB_ok="$salome_cv_lib_omniorb3"
1326 if test "x$omniORB_ok" = "xno"
1328 AC_MSG_RESULT(omniORB library linking failed)
1334 CXXFLAGS=$CXXFLAGS_old
1338 if test "x$omniORB_ok" = "xyes"
1341 OMNIORB_IDLCXXFLAGS="-I$OMNIORB_ROOT/idl"
1342 OMNIORB_IDLPYFLAGS="-bpython -I$OMNIORB_ROOT/idl"
1343 AC_SUBST(OMNIORB_IDLCXXFLAGS)
1344 AC_SUBST(OMNIORB_IDLPYFLAGS)
1346 OMNIORB_IDL_CLN_H=.hh
1347 OMNIORB_IDL_CLN_CXX=SK.cc
1348 OMNIORB_IDL_CLN_OBJ=SK.o
1349 AC_SUBST(OMNIORB_IDL_CLN_H)
1350 AC_SUBST(OMNIORB_IDL_CLN_CXX)
1351 AC_SUBST(OMNIORB_IDL_CLN_OBJ)
1353 OMNIORB_IDL_SRV_H=.hh
1354 OMNIORB_IDL_SRV_CXX=SK.cc
1355 OMNIORB_IDL_SRV_OBJ=SK.o
1356 AC_SUBST(OMNIORB_IDL_SRV_H)
1357 AC_SUBST(OMNIORB_IDL_SRV_CXX)
1358 AC_SUBST(OMNIORB_IDL_SRV_OBJ)
1361 OMNIORB_IDL_TIE_CXX=
1362 AC_SUBST(OMNIORB_IDL_TIE_H)
1363 AC_SUBST(OMNIORB_IDL_TIE_CXX)
1368 AC_DEFINE(CORBA_HAVE_POA)
1370 CORBA_ORB_INIT_HAVE_3_ARGS=1
1371 AC_DEFINE(CORBA_ORB_INIT_HAVE_3_ARGS)
1372 CORBA_ORB_INIT_THIRD_ARG='"omniORB3"'
1373 AC_DEFINE(CORBA_ORB_INIT_THIRD_ARG, "omniORB3")
1378 if test "x$omniORB_ok" = "xyes"
1380 AC_MSG_CHECKING(omniORBpy (CORBA.py file available))
1381 if test -f ${OMNIORB_ROOT}/lib/python/CORBA.py
1384 PYTHONPATH=${OMNIORB_ROOT}/lib/python:${OMNIORB_LIB}:${PYTHON_PREFIX}/lib/python${PYTHON_VERSION}:${PYTHONPATH}
1385 AC_SUBST(PYTHONPATH)
1392 AC_MSG_RESULT(for omniORBpy: $omniORBpy_ok)
1393 AC_MSG_RESULT(for omniORB: $omniORB_ok)
1401 # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
1402 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
1404 # This library is free software; you can redistribute it and/or
1405 # modify it under the terms of the GNU Lesser General Public
1406 # License as published by the Free Software Foundation; either
1407 # version 2.1 of the License.
1409 # This library is distributed in the hope that it will be useful,
1410 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1411 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1412 # Lesser General Public License for more details.
1414 # You should have received a copy of the GNU Lesser General Public
1415 # License along with this library; if not, write to the Free Software
1416 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1418 # See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
1421 AC_DEFUN([CHECK_CORBA],[
1423 if test x"$DEFAULT_ORB" = x"omniORB"
1426 # Contient le nom de l'ORB
1429 AC_MSG_RESULT(default orb : omniORB)
1433 CORBA_ROOT=$OMNIORB_ROOT
1434 CORBA_INCLUDES=$OMNIORB_INCLUDES
1435 CORBA_CXXFLAGS=$OMNIORB_CXXFLAGS
1436 CORBA_LIBS=$OMNIORB_LIBS
1437 IDLCXXFLAGS=$OMNIORB_IDLCXXFLAGS
1438 IDLPYFLAGS=$OMNIORB_IDLPYFLAGS
1440 AC_SUBST(CORBA_ROOT)
1441 AC_SUBST(CORBA_INCLUDES)
1442 AC_SUBST(CORBA_CXXFLAGS)
1443 AC_SUBST(CORBA_LIBS)
1444 AC_SUBST(IDLCXXFLAGS)
1445 AC_SUBST(IDLPYFLAGS)
1447 IDL_CLN_H=$OMNIORB_IDL_CLN_H
1448 IDL_CLN_CXX=$OMNIORB_IDL_CLN_CXX
1449 IDL_CLN_OBJ=$OMNIORB_IDL_CLN_OBJ
1452 AC_SUBST(IDL_CLN_CXX)
1453 AC_SUBST(IDL_CLN_OBJ)
1455 IDL_SRV_H=$OMNIORB_IDL_SRV_H
1456 IDL_SRV_CXX=$OMNIORB_IDL_SRV_CXX
1457 IDL_SRV_OBJ=$OMNIORB_IDL_SRV_OBJ
1460 AC_SUBST(IDL_SRV_CXX)
1461 AC_SUBST(IDL_SRV_OBJ)
1464 AC_MSG_RESULT($DEFAULT_ORB unknown orb)
1471 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
1472 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
1474 dnl This library is free software; you can redistribute it and/or
1475 dnl modify it under the terms of the GNU Lesser General Public
1476 dnl License as published by the Free Software Foundation; either
1477 dnl version 2.1 of the License.
1479 dnl This library is distributed in the hope that it will be useful,
1480 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
1481 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1482 dnl Lesser General Public License for more details.
1484 dnl You should have received a copy of the GNU Lesser General Public
1485 dnl License along with this library; if not, write to the Free Software
1486 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1488 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
1492 AC_DEFUN([CHECK_OPENGL],[
1493 AC_REQUIRE([AC_PROG_CC])dnl
1494 AC_REQUIRE([AC_PROG_CPP])dnl
1496 [ --with-opengl=DIR root directory path of OpenGL installation ],
1498 opengl_dir="$withval"
1501 dirs="/usr/lib /usr/local/lib /opt/graphics/OpenGL/lib /usr/openwin/lib /usr/X11R6/lib"
1504 AC_CHECKING(for OpenGL)
1506 AC_SUBST(OGL_INCLUDES)
1518 if test "x$local_opengl" = "xyes" ; then
1519 if test -f "${opengl_dir}/include/GL/gl.h" ; then
1521 OGL_INCLUDES="-I${opengl_dir}/include"
1522 OGL_LIBS="-L${opengl_dir}/lib"
1523 AC_MSG_RESULT(select OpenGL distribution in ${opengl_dir})
1525 AC_MSG_RESULT(no gl.h header file in ${opengl_dir}/include/GL)
1529 if test "x$OpenGL_ok" = "xno"
1531 AC_CHECK_HEADERS(GL/gl.h, [OpenGL_ok=yes])
1534 if test "x$OpenGL_ok" = "xno"
1537 AC_CHECK_HEADERS(/usr/openwin/share/include/GL/glxmd.h,
1539 OGL_INCLUDES="-I/usr/openwin/share/include/")
1542 if test "x$OpenGL_ok" = "xno"
1545 AC_CHECK_HEADERS(/opt/graphics/OpenGL/include/GL/glxmd.h,
1547 OGL_INCLUDES="-I/opt/graphics/OpenGL/include")
1549 if test "x$OpenGL_ok" = "xno"
1551 # some linux OpenGL servers hide the includes in /usr/X11R6/include/GL
1552 AC_CHECK_HEADERS(/usr/X11R6/include/GL/gl.h,
1554 OGL_INCLUDES="-I/usr/X11R6/include")
1557 if test "x$OpenGL_ok" = "xyes"
1559 AC_CHECKING(for OpenGL library)
1562 if test -r "$i/libGL.so"; then
1563 dnl AC_MSG_RESULT(in $i)
1568 if test -r "$i/libGL.sl"; then
1569 dnl AC_MSG_RESULT(in $i)
1574 LDFLAGS_old="$LDFLAGS"
1575 LDFLAGS="$LDFLAGS $OGL_LIBS"
1576 AC_CHECK_LIB(GL,glBegin,OpenGL_ok=yes,OpenGL_ok=no)
1577 LDFLAGS="$LDFLAGS_old"
1580 if test "x$OpenGL_ok" = "xyes" ; then
1581 OGL_LIBS="$OGL_LIBS -lGL"
1586 LDFLAGS_old="$LDFLAGS"
1587 LDFLAGS="$LDFLAGS $OGL_LIBS"
1588 AC_CHECK_LIB(GLU,gluBeginSurface,OpenGLU_ok=yes,OpenGLU_ok=no)
1589 LDFLAGS="$LDFLAGS_old"
1591 if test "x$OpenGLU_ok" = "xyes" ; then
1592 OGL_LIBS="$OGL_LIBS -lGLU"
1600 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
1601 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
1603 dnl This library is free software; you can redistribute it and/or
1604 dnl modify it under the terms of the GNU Lesser General Public
1605 dnl License as published by the Free Software Foundation; either
1606 dnl version 2.1 of the License.
1608 dnl This library is distributed in the hope that it will be useful,
1609 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
1610 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1611 dnl Lesser General Public License for more details.
1613 dnl You should have received a copy of the GNU Lesser General Public
1614 dnl License along with this library; if not, write to the Free Software
1615 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1617 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
1622 AC_DEFUN([CHECK_QT],[
1623 AC_REQUIRE([AC_PROG_CC])dnl
1624 AC_REQUIRE([AC_PROG_CXX])dnl
1625 AC_REQUIRE([AC_PROG_CPP])dnl
1626 AC_REQUIRE([AC_PROG_CXXCPP])dnl
1627 AC_REQUIRE([CHECK_OPENGL])dnl
1635 if test "x$QTDIR" = "x"
1637 AC_MSG_RESULT(please define QTDIR variable)
1641 if test "x$qt_ok" = "xyes"
1643 if test -f ${QTDIR}/bin/moc
1645 MOC=${QTDIR}/bin/moc
1647 AC_PATH_PROG(MOC, moc)
1649 if test "x$MOC" = "x"
1652 AC_MSG_RESULT(moc qt-compiler not in PATH variable)
1655 AC_MSG_RESULT(moc found)
1659 if test "x$qt_ok" = "xyes"
1661 if test -f ${QTDIR}/bin/uic
1663 UIC=${QTDIR}/bin/uic
1665 AC_PATH_PROG(UIC, uic)
1667 if test "x$UIC" = "x"
1670 AC_MSG_RESULT(uic qt-interface compiler not in PATH variable)
1673 AC_MSG_RESULT(uic found)
1680 if test "x$qt_ok" = "xyes"
1682 AC_MSG_CHECKING(include of qt headers)
1684 CPPFLAGS_old=$CPPFLAGS
1685 CPPFLAGS="$CPPFLAGS -I$QTDIR/include"
1688 AC_CHECK_HEADER(qaction.h,qt_ok=yes ,qt_ok=no)
1690 CPPFLAGS=$CPPFLAGS_old
1692 if test "x$qt_ok" = "xno"
1694 AC_MSG_RESULT(qt headers not found, or too old qt version, in $QTDIR/include)
1695 AC_MSG_RESULT(QTDIR environment variable may be wrong)
1698 QT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT"
1699 QT_MT_INCLUDES="-I${QT_ROOT}/include -DQT_THREAD_SUPPORT"
1703 if test "x$qt_ok" = "xyes"
1705 AC_MSG_CHECKING(linking qt library)
1707 LIBS="$LIBS -L$QTDIR/lib -lqt-mt $OGL_LIBS"
1709 CXXFLAGS_old=$CXXFLAGS
1710 CXXFLAGS="$CXXFLAGS -I$QTDIR/include"
1712 AC_CACHE_VAL(salome_cv_lib_qt,[
1714 #include <qapplication.h>
1717 QApplication a(n, s);
1719 eval "salome_cv_lib_qt=yes",eval "salome_cv_lib_qt=no")
1721 qt_ok="$salome_cv_lib_qt"
1723 if test "x$qt_ok" = "xno"
1725 AC_MSG_RESULT(unable to link with qt library)
1726 AC_MSG_RESULT(QTDIR environment variable may be wrong)
1729 QT_LIBS="-L$QTDIR/lib -lqt-mt"
1730 QT_MT_LIBS="-L$QTDIR/lib -lqt-mt"
1734 CXXFLAGS=$CXXFLAGS_old
1742 AC_SUBST(QT_INCLUDES)
1744 AC_SUBST(QT_MT_LIBS)
1748 AC_MSG_RESULT(for qt: $qt_ok)
1756 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
1757 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
1759 dnl This library is free software; you can redistribute it and/or
1760 dnl modify it under the terms of the GNU Lesser General Public
1761 dnl License as published by the Free Software Foundation; either
1762 dnl version 2.1 of the License.
1764 dnl This library is distributed in the hope that it will be useful,
1765 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
1766 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1767 dnl Lesser General Public License for more details.
1769 dnl You should have received a copy of the GNU Lesser General Public
1770 dnl License along with this library; if not, write to the Free Software
1771 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1773 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
1778 AC_DEFUN([CHECK_VTK],[
1779 AC_REQUIRE([AC_PROG_CC])dnl
1780 AC_REQUIRE([AC_PROG_CXX])dnl
1781 AC_REQUIRE([AC_PROG_CPP])dnl
1782 AC_REQUIRE([AC_PROG_CXXCPP])dnl
1784 AC_CHECKING(for VTK)
1789 AC_SUBST(VTK_INCLUDES)
1791 AC_SUBST(VTKPY_MODULES)
1801 if test "x$OpenGL_ok" != "xyes"
1803 AC_MSG_WARN(vtk needs OpenGL correct configuration, check configure output)
1807 LOCAL_INCLUDES="$OGL_INCLUDES"
1808 LOCAL_LIBS="-lvtkCommon -lvtkGraphics -lvtkImaging -lvtkFiltering -lvtkIO -lvtkRendering -lvtkHybrid $OGL_LIBS -L$x_libraries -lX11 -lXt"
1809 TRY_LINK_LIBS="-lvtkCommon $OGL_LIBS -L$x_libraries -lX11 -lXt"
1813 AC_MSG_WARN(undefined VTKHOME variable which specify where vtk was compiled)
1815 LOCAL_INCLUDES="-I$VTKHOME/include/vtk $LOCAL_INCLUDES"
1816 LOCAL_LIBS="-L$VTKHOME/lib/vtk $LOCAL_LIBS"
1817 TRY_LINK_LIBS="-L$VTKHOME/lib/vtk $TRY_LINK_LIBS"
1821 CPPFLAGS_old="$CPPFLAGS"
1822 CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES -Wno-deprecated"
1824 AC_CHECK_HEADER(vtkPlane.h,vtk_ok="yes",vtk_ok="no")
1826 CPPFLAGS="$CPPFLAGS_old"
1828 if test "x$vtk_ok" = "xyes"
1830 VTK_INCLUDES="$LOCAL_INCLUDES"
1834 AC_MSG_CHECKING(linking VTK library)
1837 # LIBS="$LIBS $TRY_LINK_LIBS"
1838 LIBS="$LIBS $LOCAL_LIBS"
1839 CPPFLAGS_old="$CPPFLAGS"
1840 CPPFLAGS="$CPPFLAGS $VTK_INCLUDES -Wno-deprecated"
1842 dnl VTKPY_MODULES="$VTKHOME/python"
1844 AC_CACHE_VAL(salome_cv_lib_vtk,[
1846 #include "vtkPlane.h"
1847 , vtkPlane *p = vtkPlane::New();,
1848 eval "salome_cv_lib_vtk=yes",eval "salome_cv_lib_vtk=no")
1850 vtk_ok="$salome_cv_lib_vtk"
1852 CPPFLAGS="$CPPFLAGS_old"
1856 if test "x$vtk_ok" = "xno"
1859 AC_MSG_WARN(unable to link with vtk library)
1861 AC_MSG_RESULT("yes")
1862 VTK_LIBS="$LOCAL_LIBS"
1863 VTK_MT_LIBS="$LOCAL_LIBS"
1866 AC_MSG_RESULT("for vtk: $vtk_ok")
1877 # Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
1878 # CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
1880 # This library is free software; you can redistribute it and/or
1881 # modify it under the terms of the GNU Lesser General Public
1882 # License as published by the Free Software Foundation; either
1883 # version 2.1 of the License.
1885 # This library is distributed in the hope that it will be useful,
1886 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1887 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1888 # Lesser General Public License for more details.
1890 # You should have received a copy of the GNU Lesser General Public
1891 # License along with this library; if not, write to the Free Software
1892 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1894 # See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
1897 AC_DEFUN([CHECK_HDF5],[
1898 AC_REQUIRE([AC_PROG_CC])dnl
1899 AC_REQUIRE([AC_PROG_CPP])dnl
1901 AC_CHECKING(for HDF5)
1904 [ --with-hdf5=DIR root directory path to hdf5 installation ],
1905 [HDF5HOME="$withval"
1906 AC_MSG_RESULT("select $withval as path to hdf5")
1909 AC_SUBST(HDF5_INCLUDES)
1911 AC_SUBST(HDF5_MT_LIBS)
1922 if test -z $HDF5HOME
1924 AC_MSG_WARN(undefined HDF5HOME variable which specify hdf5 installation directory)
1926 LOCAL_INCLUDES="-I$HDF5HOME/include"
1927 LOCAL_LIBS="-L$HDF5HOME/lib"
1932 CPPFLAGS_old="$CPPFLAGS"
1933 CPPFLAGS="$CPPFLAGS $LOCAL_INCLUDES"
1934 AC_CHECK_HEADER(hdf5.h,hdf5_ok=yes ,hdf5_ok=no)
1935 CPPFLAGS="$CPPFLAGS_old"
1938 if test "x$hdf5_ok" = "xyes"
1944 LIBS="$LIBS $LOCAL_LIBS"
1945 AC_CHECK_LIB(hdf5,H5open,hdf5_ok=yes,hdf5_ok=no)
1950 if test "x$hdf5_ok" = "xyes"
1952 HDF5_INCLUDES="$LOCAL_INCLUDES"
1953 HDF5_LIBS="$LOCAL_LIBS -lhdf5"
1954 HDF5_MT_LIBS="$LOCAL_LIBS -lhdf5"
1957 AC_MSG_RESULT(for hdf5: $hdf5_ok)
1961 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
1962 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
1964 dnl This library is free software; you can redistribute it and/or
1965 dnl modify it under the terms of the GNU Lesser General Public
1966 dnl License as published by the Free Software Foundation; either
1967 dnl version 2.1 of the License.
1969 dnl This library is distributed in the hope that it will be useful,
1970 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
1971 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1972 dnl Lesser General Public License for more details.
1974 dnl You should have received a copy of the GNU Lesser General Public
1975 dnl License along with this library; if not, write to the Free Software
1976 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1978 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
1983 AC_DEFUN([CHECK_MED2],[
1984 AC_REQUIRE([AC_PROG_CC])dnl
1985 AC_REQUIRE([AC_PROG_CPP])dnl
1986 AC_REQUIRE([CHECK_HDF5])dnl
1988 AC_CHECKING(for MED2)
1991 [ --with-med2=DIR root directory path to med2 installation ],
1992 [MED2HOME="$withval"
1993 AC_MSG_RESULT("select $withval as path to med2")
1996 AC_SUBST(MED2_INCLUDES)
1998 AC_SUBST(MED2_MT_LIBS)
2006 LOCAL_INCLUDES="$HDF5_INCLUDES"
2007 LOCAL_LIBS="-lmed $HDF5_LIBS"
2009 if test -z $MED2HOME
2011 AC_MSG_WARN(undefined MED2HOME variable which specify med2 installation directory)
2013 LOCAL_INCLUDES="$LOCAL_INCLUDES -I$MED2HOME/include"
2014 LOCAL_LIBS="-L$MED2HOME/lib $LOCAL_LIBS"
2017 dnl check med2 header
2019 CPPFLAGS_old="$CPPFLAGS"
2020 dnl we must test system : linux = -DPCLINUX
2021 CPPFLAGS="$CPPFLAGS -DPCLINUX $LOCAL_INCLUDES"
2022 AC_CHECK_HEADER(med.h,med2_ok=yes ,med2_ok=no)
2023 CPPFLAGS="$CPPFLAGS_old"
2025 if test "x$med2_ok" = "xyes"
2028 dnl check med2 library
2031 LIBS="$LIBS $LOCAL_LIBS"
2032 AC_CHECK_LIB(med,MEDouvrir,med2_ok=yes,med2_ok=no)
2037 if test "x$med2_ok" = "xyes"
2039 MED2_INCLUDES="-DPCLINUX $LOCAL_INCLUDES"
2040 MED2_LIBS="$LOCAL_LIBS"
2041 MED2_MT_LIBS="$LOCAL_LIBS"
2044 AC_MSG_RESULT(for med2: $med2_ok)
2048 dnl Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2049 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
2051 dnl This library is free software; you can redistribute it and/or
2052 dnl modify it under the terms of the GNU Lesser General Public
2053 dnl License as published by the Free Software Foundation; either
2054 dnl version 2.1 of the License.
2056 dnl This library is distributed in the hope that it will be useful,
2057 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
2058 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2059 dnl Lesser General Public License for more details.
2061 dnl You should have received a copy of the GNU Lesser General Public
2062 dnl License along with this library; if not, write to the Free Software
2063 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2065 dnl See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
2069 AC_DEFUN([CHECK_CAS],[
2070 AC_REQUIRE([AC_PROG_CXX])dnl
2071 AC_REQUIRE([AC_PROG_CXXCPP])dnl
2073 AC_CHECKING(for OpenCascade)
2078 AC_SUBST(CAS_CPPFLAGS)
2079 AC_SUBST(CAS_CXXFLAGS)
2080 AC_SUBST(CAS_KERNEL)
2081 AC_SUBST(CAS_VIEWER)
2082 AC_SUBST(CAS_MODELER)
2084 AC_SUBST(CAS_DATAEXCHANGE)
2085 AC_SUBST(CAS_LDFLAGS)
2087 AC_SUBST(CAS_LDPATH)
2094 dnl libraries directory location
2120 if test -z $CASROOT; then
2121 AC_MSG_WARN(You must provide CASROOT variable : see OCC installation manual)
2125 ff=$CASROOT/inc/Standard_Version.hxx
2126 if test -f $ff ; then
2127 grep "define OCC_VERSION_MAJOR" $ff > /dev/null
2128 if test $? = 0 ; then
2129 OCC_VERSION_MAJOR=`grep "define OCC_VERSION_MAJOR" $ff | awk '{i=3 ; print $i}'`
2134 if test "x$occ_ok" = "xyes"; then
2138 CPPFLAGS_old="$CPPFLAGS"
2139 CPPFLAGS="$CPPFLAGS -DLIN -DLINTEL -DCSFDB -DNO_CXX_EXCEPTION -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -I$CASROOT/inc -Wno-deprecated -DHAVE_WOK_CONFIG_H"
2140 CXXFLAGS_old="$CXXFLAGS"
2141 CXXFLAGS="$CXXFLAGS -funsigned-char"
2143 AC_CHECK_HEADER(Standard_Type.hxx,occ_ok=yes ,occ_ok=no)
2145 CPPFLAGS="$CPPFLAGS_old"
2146 CXXFLAGS="$CXXFLAGS_old"
2149 if test "x$occ_ok" = xyes ; then
2151 CAS_CPPFLAGS="-DOCC_VERSION_MAJOR=$OCC_VERSION_MAJOR -DLIN -DLINTEL -DCSFDB -DNO_CXX_EXCEPTION -DNo_exception -DHAVE_CONFIG_H -DHAVE_LIMITS_H -I$CASROOT/inc -DHAVE_WOK_CONFIG_H"
2152 CAS_CXXFLAGS="-funsigned-char"
2154 AC_MSG_CHECKING(for OpenCascade libraries)
2156 CPPFLAGS_old="$CPPFLAGS"
2157 CPPFLAGS="$CPPFLAGS $CAS_CPPFLAGS -Wno-deprecated"
2158 CXXFLAGS_old="$CXXFLAGS"
2159 CXXFLAGS="$CXXFLAGS $CAS_CXXFLAGS"
2161 LIBS="$LIBS -L$CASROOT/$casdir/lib -lTKernel"
2162 AC_CACHE_VAL(salome_cv_lib_occ,[
2164 using namespace std;
2165 #include <Standard_Type.hxx>
2167 const Standard_CString aName="toto";
2168 Standard_Type myST(aName) ;
2170 eval "salome_cv_lib_occ=yes",eval "salome_cv_lib_occ=no")
2172 occ_ok="$salome_cv_lib_occ"
2174 CPPFLAGS="$CPPFLAGS_old"
2175 CXXFLAGS="$CXXFLAGS_old"
2179 if test "x$occ_ok" = xno ; then
2181 AC_MSG_WARN(Opencascade libraries not found)
2184 CAS_LDPATH="-L$CASROOT/$casdir/lib "
2185 CAS_KERNEL="$CAS_LDPATH -lTKernel -lTKMath"
2186 CAS_OCAF="$CAS_LDPATH -lPTKernel -lTKCAF -lFWOSPlugin -lTKPShape -lTKPCAF -lTKStdSchema -lTKShapeSchema -lPAppStdPlugin -lTKPAppStd -lTKCDF"
2187 dnl CAS_VIEWER="-L$CASROOT/$casdir/lib -lTKOpenGl -lTKV3d -lTKV2d -lTKService"
2188 CAS_VIEWER="$CAS_LDPATH -lTKOpenGl -lTKV3d -lTKService"
2189 # CAS_MODELER="-L$CASROOT/$casdir/lib -lTKG2d -lTKG3d -lTKGeomBase -lTKBRep -lTKGeomAlgo -lTKTopAlgo -lTKPrim -lTKBool -lTKHLR -lTKFillet -lTKFeat -lTKOffset"
2190 CAS_MODELER="$CAS_LDPATH -lTKG2d -lTKG3d -lTKGeomBase -lTKBRep -lTKGeomAlgo -lTKTopAlgo -lTKPrim -lTKBool -lTKHLR -lTKFillet -lTKOffset"
2191 dnl CAS_DATAEXCHANGE="-L$CASROOT/$casdir/lib -lTKXSBase -lTKIGES -lTKSTEP -lTKShHealing -lTKShHealingStd -lTKSTL -lTKVRML "
2192 CAS_DATAEXCHANGE="$CAS_LDPATH -lTKXSBase -lTKIGES -lTKSTEP -lTKShHealing -lTKShHealingStd"
2193 CAS_LDFLAGS="$CAS_KERNEL $CAS_OCAF $CAS_VIEWER $CAS_MODELER $CAS_DATAEXCHANGE"
2204 dnl Copyright (C) 2003 CEA/DEN, EDF R&D
2206 AC_DEFUN([CHECK_HTML_GENERATORS],[
2208 #AC_CHECKING(for html generators)
2209 AC_CHECKING(for doxygen)
2213 dnl were is doxygen ?
2215 AC_PATH_PROG(DOXYGEN,doxygen)
2217 if test "x$DOXYGEN" = "x"
2221 AC_MSG_WARN(doxygen not found)
2223 dnl AC_SUBST(DOXYGEN)
2227 AC_CHECKING(for graphviz)
2231 dnl were is graphviz ?
2233 AC_PATH_PROG(DOT,dot)
2235 if test "x$DOT" = "x" ; then
2238 AC_MSG_WARN(graphviz not found)
2246 # Check availability of Salome's KERNEL binary distribution
2248 # Author : Jerome Roy (CEA, 2003)
2251 AC_DEFUN([CHECK_KERNEL],[
2253 AC_CHECKING(for Kernel)
2258 [ --with-kernel=DIR root directory path of KERNEL build or installation],
2259 KERNEL_DIR="$withval",KERNEL_DIR="")
2261 if test "x$KERNEL_DIR" == "x" ; then
2263 # no --with-kernel-dir option used
2265 if test "x$KERNEL_ROOT_DIR" != "x" ; then
2267 # KERNEL_ROOT_DIR environment variable defined
2268 KERNEL_DIR=$KERNEL_ROOT_DIR
2272 # search Kernel binaries in PATH variable
2273 AC_PATH_PROG(TEMP, runSalome)
2274 if test "x$TEMP" != "x" ; then
2275 KERNEL_BIN_DIR=`dirname $TEMP`
2276 KERNEL_DIR=`dirname $KERNEL_BIN_DIR`
2283 if test -f ${KERNEL_DIR}/bin/salome/runSalome ; then
2285 AC_MSG_RESULT(Using Kernel module distribution in ${KERNEL_DIR})
2287 if test "x$KERNEL_ROOT_DIR" == "x" ; then
2288 KERNEL_ROOT_DIR=${KERNEL_DIR}
2290 if test "x$KERNEL_SITE_DIR" == "x" ; then
2291 KERNEL_SITE_DIR=${KERNEL_ROOT_DIR}
2293 AC_SUBST(KERNEL_ROOT_DIR)
2294 AC_SUBST(KERNEL_SITE_DIR)
2297 AC_MSG_WARN("Cannot find compiled Kernel module distribution")
2300 AC_MSG_RESULT(for Kernel: $Kernel_ok)
2305 # Check availability of Geom binary distribution
2307 # Author : Nicolas REJNERI (OPEN CASCADE, 2003)
2310 AC_DEFUN([CHECK_GEOM],[
2312 AC_CHECKING(for Geom)
2317 [ --with-geom=DIR root directory path of GEOM installation ],
2318 GEOM_DIR="$withval",GEOM_DIR="")
2320 if test "x$GEOM_DIR" == "x" ; then
2322 # no --with-geom-dir option used
2324 if test "x$GEOM_ROOT_DIR" != "x" ; then
2326 # GEOM_ROOT_DIR environment variable defined
2327 GEOM_DIR=$GEOM_ROOT_DIR
2331 # search Geom binaries in PATH variable
2332 AC_PATH_PROG(TEMP, libGEOM_Swig.py)
2333 if test "x$TEMP" != "x" ; then
2334 GEOM_BIN_DIR=`dirname $TEMP`
2335 GEOM_DIR=`dirname $GEOM_BIN_DIR`
2342 if test -f ${GEOM_DIR}/bin/salome/libGEOM_Swig.py ; then
2344 AC_MSG_RESULT(Using Geom module distribution in ${GEOM_DIR})
2346 if test "x$GEOM_ROOT_DIR" == "x" ; then
2347 GEOM_ROOT_DIR=${GEOM_DIR}
2349 AC_SUBST(GEOM_ROOT_DIR)
2352 AC_MSG_WARN("Cannot find compiled Geom module distribution")
2355 AC_MSG_RESULT(for Geom: $Geom_ok)
2360 # Check availability of SMesh binary distribution
2362 # Author : Nicolas REJNERI (OPEN CASCADE, 2003)
2365 AC_DEFUN([CHECK_SMESH],[
2367 AC_CHECKING(for SMesh)
2372 [ --with-smesh=DIR root directory path of SMESH installation ],
2373 SMESH_DIR="$withval",SMESH_DIR="")
2375 if test "x$SMESH_DIR" == "x" ; then
2377 # no --with-smesh option used
2379 if test "x$SMESH_ROOT_DIR" != "x" ; then
2381 # SMESH_ROOT_DIR environment variable defined
2382 SMESH_DIR=$SMESH_ROOT_DIR
2386 # search SMESH binaries in PATH variable
2387 AC_PATH_PROG(TEMP, libSMESH_Swig.py)
2388 if test "x$TEMP" != "x" ; then
2389 SMESH_BIN_DIR=`dirname $TEMP`
2390 SMESH_DIR=`dirname $SMESH_BIN_DIR`
2397 if test -f ${SMESH_DIR}/bin/salome/libSMESH_Swig.py ; then
2399 AC_MSG_RESULT(Using SMesh module distribution in ${SMESH_DIR})
2401 if test "x$SMESH_ROOT_DIR" == "x" ; then
2402 SMESH_ROOT_DIR=${SMESH_DIR}
2404 AC_SUBST(SMESH_ROOT_DIR)
2407 AC_MSG_WARN("Cannot find compiled SMesh module distribution")
2410 AC_MSG_RESULT(for SMesh: $SMesh_ok)
2415 AC_DEFUN([CHECK_GHS3D],[
2417 AC_REQUIRE([AC_PROG_CXX])dnl
2418 AC_REQUIRE([AC_PROG_CXXCPP])dnl
2420 AC_CHECKING(for GHS3D executable)
2425 [ --with-ghs3d=DIR root directory path of GHS33D installation],
2426 GHS3D_HOME=$withval,GHS3D_HOME="")
2429 GHS3D_HOME="/dn05/salome/GHS3D/"
2430 GHS3D="/misc/dn05/salome/GHS3D/ghs3d3.1-1/bin/Linux/ghs3dV3.1-1"
2432 #if test "x$GHS3D_HOME" == "x" ; then
2434 # if test "x$GHS3DHOME" != "x" ; then
2436 # # GHS3DHOME environment variable defined
2437 # GHS3D_HOME=$GHS3DHOME
2443 if test "x$GHS3D_ok" == xno ; then
2445 AC_MSG_WARN(GHS3D libraries not found or not properly installed)