1 dnl Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
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
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.
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.
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
20 dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 AC_DEFUN([CHECK_MICO],[
24 AC_REQUIRE([AC_PROG_CC])dnl
25 AC_REQUIRE([AC_PROG_CXX])dnl
26 AC_REQUIRE([AC_PROG_CPP])dnl
27 AC_REQUIRE([AC_PROG_CXXCPP])dnl
35 AC_PATH_PROG(MICOD, micod)
36 if test "x$MICOD" = "x"
39 AC_MSG_RESULT(mico binaries not in PATH variable)
44 if test "x$mico_ok" = "xyes"
48 MICO_BIN=`echo ${MICOD} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
49 MICO_LIB=`echo ${MICO_BIN} | sed -e "s,bin,lib,"`
50 MICO_ROOT=`echo ${MICO_BIN} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
53 MICO_IDL=${MICO_BIN}/idl
56 MICO_INCLUDES="-I$MICO_ROOT/include"
57 AC_SUBST(MICO_INCLUDES)
59 MICO_VERSION=`sed -n -e 's/.define *MICO_VERSION *\"\([[^\"]]*\)\"/\1/p' $MICO_ROOT/include/mico/version.h`
60 AC_SUBST(MICO_VERSION)
61 AC_MSG_RESULT(using mico version $MICO_VERSION)
63 MICO_CXXFLAGS="-ftemplate-depth-42 -fpermissive"
64 AC_SUBST(MICO_CXXFLAGS)
66 CXXFLAGS_old=$CXXFLAGS
67 CXXFLAGS="$CXXFLAGS $MICO_CXXFLAGS $MICO_INCLUDES"
69 AC_MSG_CHECKING(include of CORBA.h)
72 , ,mico_ok=yes ,mico_ok=no)
74 if test "x$mico_ok" = "xno"
76 AC_MSG_RESULT(CORBA.h not found in mico installation)
81 CXXFLAGS=$CXXFLAGS_old
85 if test "x$mico_ok" = "xyes"
87 if test "x$MICO_LIB" = "x/usr/lib"
91 MICO_LDFLAGS="-L$MICO_LIB"
95 MICO_LIBS="$MICO_LDFLAGS -lmico$MICO_VERSION -ldl"
98 LIBS="$MICO_LIBS $LIBS"
99 CXXFLAGS_old=$CXXFLAGS
100 CXXFLAGS="$CXXFLAGS $MICO_CXXFLAGS $MICO_INCLUDES"
102 AC_MSG_CHECKING(whether we can link with mico)
106 mico_ok=yes,mico_ok=no)
108 if test "x$mico_ok" = "xno"
110 AC_MSG_RESULT(mico library linking failed)
116 CXXFLAGS=$CXXFLAGS_old
121 if test "x$mico_ok" = "xyes"
124 MICO_IDLCXXFLAGS="-bcxx -I$MICO_ROOT/idl"
125 AC_SUBST(MICO_IDLCXXFLAGS)
126 AC_SUBST(MICO_IDLPYFLAGS)
129 MICO_IDL_CLN_CXX=SK.cc
130 MICO_IDL_CLN_OBJ=SK.o
131 AC_SUBST(MICO_IDL_CLN_H)
132 AC_SUBST(MICO_IDL_CLN_CXX)
133 AC_SUBST(MICO_IDL_CLN_OBJ)
136 MICO_IDL_SRV_CXX=SK.cc
137 MICO_IDL_SRV_OBJ=SK.o
138 AC_SUBST(MICO_IDL_SRV_H)
139 AC_SUBST(MICO_IDL_SRV_CXX)
140 AC_SUBST(MICO_IDL_SRV_OBJ)
144 AC_SUBST(MICO_IDL_TIE_H)
145 AC_SUBST(MICO_IDL_TIE_CXX)
150 AC_DEFINE(CORBA_HAVE_POA)
156 AC_MSG_RESULT(for mico: $mico_ok)