1 dnl Copyright (C) 2007-2008 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
22 AC_DEFUN([CHECK_MICO],[
23 AC_REQUIRE([AC_PROG_CC])dnl
24 AC_REQUIRE([AC_PROG_CXX])dnl
25 AC_REQUIRE([AC_PROG_CPP])dnl
26 AC_REQUIRE([AC_PROG_CXXCPP])dnl
34 AC_PATH_PROG(MICOD, micod)
35 if test "x$MICOD" = "x"
38 AC_MSG_RESULT(mico binaries not in PATH variable)
43 if test "x$mico_ok" = "xyes"
47 MICO_BIN=`echo ${MICOD} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
48 MICO_LIB=`echo ${MICO_BIN} | sed -e "s,bin,lib,"`
49 MICO_ROOT=`echo ${MICO_BIN} | sed -e "s,[[^/]]*$,,;s,/$,,;s,^$,.,"`
52 MICO_IDL=${MICO_BIN}/idl
55 MICO_INCLUDES="-I$MICO_ROOT/include"
56 AC_SUBST(MICO_INCLUDES)
58 MICO_VERSION=`sed -n -e 's/.define *MICO_VERSION *\"\([[^\"]]*\)\"/\1/p' $MICO_ROOT/include/mico/version.h`
59 AC_SUBST(MICO_VERSION)
60 AC_MSG_RESULT(using mico version $MICO_VERSION)
62 MICO_CXXFLAGS="-ftemplate-depth-42 -fpermissive"
63 AC_SUBST(MICO_CXXFLAGS)
65 CXXFLAGS_old=$CXXFLAGS
66 CXXFLAGS="$CXXFLAGS $MICO_CXXFLAGS $MICO_INCLUDES"
68 AC_MSG_CHECKING(include of CORBA.h)
71 , ,mico_ok=yes ,mico_ok=no)
73 if test "x$mico_ok" = "xno"
75 AC_MSG_RESULT(CORBA.h not found in mico installation)
80 CXXFLAGS=$CXXFLAGS_old
84 if test "x$mico_ok" = "xyes"
86 if test "x$MICO_LIB" = "x/usr/lib"
90 MICO_LDFLAGS="-L$MICO_LIB"
94 MICO_LIBS="$MICO_LDFLAGS -lmico$MICO_VERSION -ldl"
97 LIBS="$MICO_LIBS $LIBS"
98 CXXFLAGS_old=$CXXFLAGS
99 CXXFLAGS="$CXXFLAGS $MICO_CXXFLAGS $MICO_INCLUDES"
101 AC_MSG_CHECKING(whether we can link with mico)
105 mico_ok=yes,mico_ok=no)
107 if test "x$mico_ok" = "xno"
109 AC_MSG_RESULT(mico library linking failed)
115 CXXFLAGS=$CXXFLAGS_old
120 if test "x$mico_ok" = "xyes"
123 MICO_IDLCXXFLAGS="-bcxx -I$MICO_ROOT/idl"
124 AC_SUBST(MICO_IDLCXXFLAGS)
125 AC_SUBST(MICO_IDLPYFLAGS)
128 MICO_IDL_CLN_CXX=SK.cc
129 MICO_IDL_CLN_OBJ=SK.o
130 AC_SUBST(MICO_IDL_CLN_H)
131 AC_SUBST(MICO_IDL_CLN_CXX)
132 AC_SUBST(MICO_IDL_CLN_OBJ)
135 MICO_IDL_SRV_CXX=SK.cc
136 MICO_IDL_SRV_OBJ=SK.o
137 AC_SUBST(MICO_IDL_SRV_H)
138 AC_SUBST(MICO_IDL_SRV_CXX)
139 AC_SUBST(MICO_IDL_SRV_OBJ)
143 AC_SUBST(MICO_IDL_TIE_H)
144 AC_SUBST(MICO_IDL_TIE_CXX)
149 AC_DEFINE(CORBA_HAVE_POA)
155 AC_MSG_RESULT(for mico: $mico_ok)