Skip to content

Commit

Permalink
- Added support for omniORB in qtclients.
Browse files Browse the repository at this point in the history
  + We can now remove the dependency on mico for Linux systems.


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5344 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Apr 21, 2010
1 parent 3af9dfd commit 91feb67
Show file tree
Hide file tree
Showing 7 changed files with 212 additions and 88 deletions.
5 changes: 1 addition & 4 deletions Compiler/omc_debug/Makefile.in
Expand Up @@ -21,7 +21,6 @@ RMLINC = -I$(RMLHOME)/include/plain


USE_CORBA = @USE_CORBA@
CORBAHOME = @CORBAHOME@

EXEEXT = @EXEEXT@

Expand All @@ -35,10 +34,8 @@ builddir_doc=$(top_builddir)/build/doc

include $(srcdir)/Makefile.common

CORBALIB=`mico-config --libs`

ifdef USE_CORBA
CORBALIBS=$(CORBALIB)
CORBALIBS=@CORBALIBS@
else
CORBALIBS=
endif
Expand Down
5 changes: 1 addition & 4 deletions Compiler/omc_profiler/Makefile.in
Expand Up @@ -21,7 +21,6 @@ RMLINC = -I$(RMLHOME)/include/plain


USE_CORBA = @USE_CORBA@
CORBAHOME = @CORBAHOME@

EXEEXT = @EXEEXT@

Expand All @@ -35,10 +34,8 @@ builddir_doc=$(top_builddir)/build/doc

include $(srcdir)/Makefile.common

CORBALIB=`mico-config --libs`

ifdef USE_CORBA
CORBALIBS=$(CORBALIB)
CORBALIBS=$CORBALIBS$
else
CORBALIBS=
endif
Expand Down
5 changes: 1 addition & 4 deletions Compiler/omc_release/Makefile.in
Expand Up @@ -14,7 +14,6 @@ LIBSOCKET = @LIBSOCKET@
LIBLPSOLVE55 = @LIBLPSOLVE55@

USE_CORBA = @USE_CORBA@
CORBAHOME = @CORBAHOME@

SHELL = /bin/sh
CC = gcc
Expand All @@ -32,10 +31,8 @@ builddir_inc=$(top_builddir)/build/include
builddir_doc=$(top_builddir)/build/doc
include $(srcdir)/Makefile.common

CORBALIB=`mico-config --libs`

ifdef USE_CORBA
CORBALIBS=$(CORBALIB)
CORBALIBS=@CORBALIBS@
else
CORBALIBS=
endif
Expand Down
3 changes: 1 addition & 2 deletions Compiler/runtime/Makefile.in
Expand Up @@ -14,14 +14,13 @@ builddir_inc=$(top_builddir)/build/include
builddir_doc=$(top_builddir)/build/doc

USE_CORBA = @USE_CORBA@
CORBAHOME = @CORBAHOME@

RMLINCLUDE = @rmlinc@
CFLAGS = @DEFS@ $(USE_CORBA)

ifdef USE_CORBA
CORBASRC = omc_communication.cc omc_communication_impl.cpp corbaimpl.cpp
CORBAINCL = -I$(CORBAHOME)/include
CORBAINCL = @CORBACFLAGS@
else
CORBASRC = corbaimpl_stub.cpp
CORBAINCL =
Expand Down
4 changes: 2 additions & 2 deletions Makefile.in
Expand Up @@ -63,9 +63,9 @@ qtclients: mkbuilddirs
echo "environment variable QTHOME should be defined"
echo "Coin3D (www.coin3d.org) and SoQt should be installed and in the path!"
echo "using QTHOME=${QTHOME}"
(cd OMShell && qmake && make && cp -p OMShell ../$(builddir_bin)/.)
(cd OMShell && @IDLCMD@ ../Compiler/runtime/omc_communication.idl && CORBALIBS="@CORBALIBS@" CORBAINCL="@CORBACFLAGS@" qmake && make && cp -p OMShell ../$(builddir_bin)/.)
(cd OMNotebook/ext && qmake && make && cp -p ext ../../$(builddir_bin)/.)
(cd OMNotebook/OMNotebookQT4 && qmake && make && cp -p OMNotebook *.xml ../../$(builddir_bin)/.)
(cd OMNotebook/OMNotebookQT4 && @IDLCMD@ ../../Compiler/runtime/omc_communication.idl && USE_CORBA="@QT_USE_CORBA@" CORBALIBS="@CORBALIBS@" CORBAINCL="@CORBACFLAGS@" qmake && make && cp -p OMNotebook *.xml ../../$(builddir_bin)/.)

clean:
(cd c_runtime && $(MAKE) -f Makefile clean)
Expand Down
191 changes: 152 additions & 39 deletions configure
Expand Up @@ -611,7 +611,8 @@ BOOSTHOME
USE_MODPAR
IDLCMD
CORBALIBS
CORBAHOME
CORBACFLAGS
QT_USE_CORBA
USE_CORBA
LIBLPSOLVE55
LIBNSL
Expand Down Expand Up @@ -666,6 +667,8 @@ ac_subst_files=''
ac_user_opts='
enable_option_checking
with_CORBA
with_MICO
with_ORBIT2
with_omniORB
with_MODPAR
with_BOOST
Expand Down Expand Up @@ -1286,8 +1289,10 @@ if test -n "$ac_init_help"; then
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-CORBA=DIR use corba installed in DIR /usr/local
--with-omniORB=DIR use omniORB installed in DIR
--with-CORBA=DIR use mico corba installed in DIR (or use mico-config)
--with-MICO=DIR use mico corba installed in DIR (or use mico-config)
--with-ORBIT2=DIR use orbit2 installed in DIR (or use orbit2-config)
--with-omniORB=DIR use omniORB installed in DIR
--with-MODPAR Compile with automatic parallelization, requires boost
--with-BOOST=DIR With BOOST library in DIR
Expand Down Expand Up @@ -2150,6 +2155,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu





ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
Expand Down Expand Up @@ -3961,7 +3967,7 @@ _ACEOF
LIBS="-llpsolve55 $LIBS"

else
as_fn_error "not found" "$LINENO" 5
as_fn_error "linking failed" "$LINENO" 5
fi

LIBLPSOLVE55=$LIBS
Expand Down Expand Up @@ -4079,54 +4085,162 @@ fi

# Check whether --with-CORBA was given.
if test "${with_CORBA+set}" = set; then :
withval=$with_CORBA;
if test "x$withval" = "xno" ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: disabling CORBA" >&5
$as_echo "disabling CORBA" >&6; };
USE_CORBA="";
CORBAHOME="";
CORBALIBS="";
IDLCMD="";
withval=$with_CORBA; WANT_MICO="$withval"
else
if test "x$withval" = "xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling CORBA... CORBAHOME=\"/usr/local\"" >&5
$as_echo "enabling CORBA... CORBAHOME=\"/usr/local\"" >&6; };
USE_CORBA="-DUSE_CORBA";
CORBAHOME="/usr/local";
CORBALIBS="-lmico -lcrypto -lssl -lpthread";
IDLCMD="idl";
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling CORBA... CORBAHOME=\"$withval\"" >&5
$as_echo "enabling CORBA... CORBAHOME=\"$withval\"" >&6; };
USE_CORBA="-DUSE_CORBA";
CORBAHOME="$withval";
CORBALIBS="-lmico -lcrypto -lssl -lpthread";
IDLCMD="idl";
fi
WANT_MICO="no"
fi

else

{ $as_echo "$as_me:${as_lineno-$LINENO}: result: disabling CORBA (no CORBAHOME given)" >&5
$as_echo "disabling CORBA (no CORBAHOME given)" >&6; }; USE_CORBA=""; CORBAHOME="";CORBALIBS="";IDLCMD="";

# Check whether --with-MICO was given.
if test "${with_MICO+set}" = set; then :
withval=$with_MICO; WANT_MICO="$withval"
fi


# Check whether --with-ORBIT2 was given.
if test "${with_ORBIT2+set}" = set; then :
withval=$with_ORBIT2; WANT_ORBIT2="$withval"
else
WANT_ORBIT2="no"
fi


# Check whether --with-omniORB was given.
if test "${with_omniORB+set}" = set; then :
withval=$with_omniORB;
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: enabling omniORB... CORBAHOME=\"$withval\"" >&5
$as_echo "enabling omniORB... CORBAHOME=\"$withval\"" >&6; };
USE_CORBA="-DUSE_CORBA -DUSE_OMNIORB";
CORBALIBS="-lomniORB4 -lomnithread -lpthread";
CORBAHOME="$withval";
IDLCMD="omniidl -bcxx -Wbh=.h -Wbs=.cc";
withval=$with_omniORB; WANT_OMNIORB="$withval"
else
WANT_OMNIORB="no"
fi


if test ! "$WANT_MICO" = "no"; then
if test "$WANT_MICO" = "yes"; then
MICO="mico-config";
else
MICO="$withval/bin/mico-config";
fi
# Extract the first word of "$MICO", so it can be a program name with args.
set dummy $MICO; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_USE_CORBA+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$USE_CORBA"; then
ac_cv_prog_USE_CORBA="$USE_CORBA" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_USE_CORBA="-DUSE_CORBA -DUSE_MICO"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

test -z "$ac_cv_prog_USE_CORBA" && ac_cv_prog_USE_CORBA="no"
fi
fi
USE_CORBA=$ac_cv_prog_USE_CORBA
if test -n "$USE_CORBA"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_CORBA" >&5
$as_echo "$USE_CORBA" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


if test "$USE_CORBA" = "no"; then
as_fn_error "failed to find mico-corba" "$LINENO" 5
fi
QT_USE_CORBA="USE_MICO"
CORBACFLAGS=-I`mico-config --prefix`/include;
CORBALIBS=`mico-config --libs`;
IDLCMD="idl";
DESIRED_CORBA="mico"
elif test ! "$WANT_ORBIT2" = "no"; then
if test "$WANT_ORBIT2" = "yes"; then
ORBIT2="orbit2-config";
else
ORBIT2="$withval/bin/orbit2-config";
fi
# Extract the first word of "$ORBIT2", so it can be a program name with args.
set dummy $ORBIT2; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if test "${ac_cv_prog_USE_CORBA+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$USE_CORBA"; then
ac_cv_prog_USE_CORBA="$USE_CORBA" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_USE_CORBA="-DUSE_CORBA -DUSE_ORBIT2"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

test -z "$ac_cv_prog_USE_CORBA" && ac_cv_prog_USE_CORBA="no"
fi
fi
USE_CORBA=$ac_cv_prog_USE_CORBA
if test -n "$USE_CORBA"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_CORBA" >&5
$as_echo "$USE_CORBA" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


if test "$USE_CORBA" = "no"; then
as_fn_error "failed to find orbit2" "$LINENO" 5
fi
QT_USE_CORBA="USE_ORBIT2"
CORBACFLAGS=`orbit2-config --cflags`;
CORBALIBS=`orbit2-config --libs`;
IDLCMD="orbit-idl-2";
DESIRED_CORBA="orbit2"
as_fn_error "ORBIT2 is not supported yet" "$LINENO" 5
elif test ! "$WANT_OMNIORB" = "no"; then
if test "$WANT_OMNIORB" = "yes"; then
WANT_OMNIORB="/usr";
fi
USE_CORBA="-DUSE_CORBA -DUSE_OMNIORB";
QT_USE_CORBA="USE_OMNIORB"
CORBALIBS="-lomniORB4 -lomnithread -lpthread";
CORBACFLAGS="-I$WANT_OMNIORB/include";
IDLCMD="omniidl -bcxx -Wbh=.h -Wbs=.cc";
DESIRED_CORBA="omniorb"
else
USE_CORBA="";
CORBACFLAGS="";
CORBALIBS="";
IDLCMD="";
DESIRED_CORBA="none"
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if CORBA is desired" >&5
$as_echo_n "checking if CORBA is desired... " >&6; };
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DESIRED_CORBA" >&5
$as_echo "$DESIRED_CORBA" >&6; };



# Check whether --with-MODPAR was given.
Expand Down Expand Up @@ -5322,4 +5436,3 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
fi

0 comments on commit 91feb67

Please sign in to comment.