Skip to content

Commit

Permalink
Some fixes for splitting the OM repository
Browse files Browse the repository at this point in the history
- Save idl-file in share/omc
- Save qwt includes in include/omc/qwt
- Use a corba.m4 so it is easier to update common autoconf parts between repositories (possibly making this part of a small common repository)


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@25762 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Apr 27, 2015
1 parent c33cb3a commit 16cfe19
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 85 deletions.
7 changes: 6 additions & 1 deletion Makefile.common
Expand Up @@ -43,6 +43,7 @@ mkbuilddirs:
mkdir -p $(builddir_inc)/c/fmi1/
mkdir -p $(builddir_inc)/c/fmi2/
mkdir -p $(builddir_inc)/scripting-API
mkdir -p $(builddir_inc)/qwt
mkdir -p $(builddir_java)
mkdir -p $(builddir_share)/omc/scripts/OpenTurns/
mkdir -p $(builddir_doc)/omc/testmodels
Expand All @@ -64,7 +65,11 @@ install-python:
install-openturns: mkbuilddirs
(time cp SimulationRuntime/OpenTurns/* $(builddir_share)/omc/scripts/OpenTurns/)

interactive: .testvariables mkbuilddirs boehm-gc fmil libraries/msl-external-libs lis Cdaskr CMinpack $(IPOPT_TARGET) $(UMFPACK_TARGET)
$(datadir)/omc/omc_communication.idl: Compiler/runtime/omc_communication.idl
cp -a "$<" "$@"
idl: $(datadir)/omc/omc_communication.idl

interactive: .testvariables mkbuilddirs boehm-gc fmil idl libraries/msl-external-libs lis Cdaskr CMinpack $(IPOPT_TARGET) $(UMFPACK_TARGET)
$(MAKE) -C SimulationRuntime/c -f $(defaultMakefileTarget)

docs: mkbuilddirs
Expand Down
4 changes: 3 additions & 1 deletion Makefile.in
Expand Up @@ -91,8 +91,10 @@ ifeq ($(QMAKE),)
qtclients:
@echo "*** OpenModelica configured without support for Qt"
else
qwt-build:
qwt-build: mkbuilddirs
$(MAKE) -C 3rdParty/qwt -f Makefile.unix
test -f $(builddir_inc)/qwt/qwt_global.h || ($(MAKE) -C 3rdParty/qwt install && cp -a 3rdParty/qwt/build/include/*.h $(builddir_inc)/qwt)

build/lib/omc/libomqwt.so: mkbuilddirs qwt-build
cp -a 3rdParty/qwt/lib/libomqwt.so* build/lib/omc/
build/lib/omc/libomqwt.dylib: mkbuilddirs qwt-build
Expand Down
84 changes: 1 addition & 83 deletions configure.in
Expand Up @@ -586,89 +586,7 @@ AS_IF([test "x$with_UMFPACK" = xyes],
UMFPACK_LDFLAGS=""
])



dnl should we use corba?

WANT_ORBIT2="no"
WANT_MICO="no"
AC_ARG_WITH(MICO, [ --with-MICO=DIR use mico corba installed in DIR (or use mico-config)],[WANT_MICO="$withval"],[])
AC_ARG_WITH(omniORB, [ --with-omniORB=DIR use omniORB installed in DIR (recommended CORBA implementation)],[WANT_OMNIORB="$withval"],[WANT_OMNIORB="no"])

if test ! "$WANT_MICO" = "no"; then
if test "$WANT_MICO" = "yes"; then
MICO="mico-config";
IDLCMD="idl";
else
MICO="$WANT_MICO/bin/mico-config";
IDLCMD="$WANT_MICO/bin/idl";
fi
if test "$USE_CORBA" = "no"; then
AC_MSG_ERROR([failed to find mico-corba])
fi
AC_MSG_CHECKING([mico version])
if ! $MICO --version; then
AC_MSG_ERROR([failed to call $MICO])
fi
USE_CORBA="-DUSE_CORBA -DUSE_MICO"
QT_USE_CORBA="USE_MICO"
AC_MSG_CHECKING([mico settings])
CORBACFLAGS="-I`$MICO --prefix`/include -I.";
CORBA_QMAKE_INCLUDES="`$MICO --prefix`/include -I.";
CORBALIBS="`$MICO --libs`";
AC_MSG_RESULT([$CORBACFLAGS $USE_CORBA $QT_USE_CORBA])
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
AC_CHECK_PROG(USE_CORBA,$ORBIT2,[-DUSE_CORBA -DUSE_ORBIT2],[no])
if test "$USE_CORBA" = "no"; then
AC_MSG_ERROR([failed to find orbit2])
fi
USE_CORBA="-DUSE_CORBA -DUSE_ORBIT"
QT_USE_CORBA="USE_ORBIT2"
CORBACFLAGS=`orbit2-config --cflags`;
# Don't have orbit2-config installed to verify
CORBA_QMAKE_INCLUDES=`orbit2-config --prefix`/include/;
CORBALIBS=`orbit2-config --libs`;
IDLCMD="orbit-idl-2";
DESIRED_CORBA="orbit2"
AC_MSG_ERROR([ORBIT2 is not supported yet])
elif test ! "$WANT_OMNIORB" = "no"; then
if test "$WANT_OMNIORB" = "yes"; then
OMNIORB_LDFLAGS="";
IDLPATH="omniidl";
else
CORBA_QMAKE_INCLUDES="$WANT_OMNIORB/include";
CORBACFLAGS="-I$CORBA_QMAKE_INCLUDES";
IDLPATH="$WANT_OMNIORB/bin/omniidl"
OMNIORB_LDFLAGS="-L'$WANT_OMNIORB/lib'";
fi
AC_PATH_PROG(IDLPATH,$IDLPATH,[no])
if test "$IDLPATH" = "no"; then
AC_MSG_ERROR([failed to find $IDLPATH])
fi
USE_CORBA="-DUSE_CORBA -DUSE_OMNIORB"
# Cannot search for libs (C++ symbols) or includes (automatically generated; may differ between platforms)
IDLCMD="$IDLPATH -bcxx -Wbh=.h -Wbs=.cc";
IDLPYTHONCMD="$IDLPATH -bpython";
QT_USE_CORBA="USE_OMNIORB"
CORBALIBS="$LIBS -lomniORB4 -lomnithread -lpthread"
DESIRED_CORBA="omniorb"
PYTHON_INTERFACE="yes"
else
USE_CORBA="";
CORBACFLAGS="";
CORBALIBS="";
IDLCMD="";
DESIRED_CORBA="none"
fi

AC_MSG_CHECKING([for CORBA]);
AC_MSG_RESULT([$DESIRED_CORBA]);
m4_include([corba.m4])

AC_MSG_CHECKING([if the user wants to use the Python interface])
AC_ARG_ENABLE(python-interface, [ --disable-python-interface Python interface to omc. Enabled by default if CORBA is enabled.],[test "xno" = x"$enableval" && PYTHON_INTERFACE=""])
Expand Down
85 changes: 85 additions & 0 deletions corba.m4
@@ -0,0 +1,85 @@
dnl should we use corba?

if test -z "$OMNIORB_DEFAULT"; then
OMNIORB_DEFAULT="no"
fi

WANT_ORBIT2="no"
WANT_MICO="no"
AC_ARG_WITH(MICO, [ --with-MICO=DIR use mico corba installed in DIR (or use mico-config)],[WANT_MICO="$withval"],[])
AC_ARG_WITH(omniORB, [ --with-omniORB=DIR use omniORB installed in DIR (recommended CORBA implementation)],[WANT_OMNIORB="$withval"],[WANT_OMNIORB="$OMNIORB_DEFAULT"])

if test ! "$WANT_MICO" = "no"; then
if test "$WANT_MICO" = "yes"; then
MICO="mico-config";
IDLCMD="idl";
else
MICO="$WANT_MICO/bin/mico-config";
IDLCMD="$WANT_MICO/bin/idl";
fi
if test "$USE_CORBA" = "no"; then
AC_MSG_ERROR([failed to find mico-corba])
fi
AC_MSG_CHECKING([mico version])
if ! $MICO --version; then
AC_MSG_ERROR([failed to call $MICO])
fi
USE_CORBA="-DUSE_CORBA -DUSE_MICO"
QT_USE_CORBA="USE_MICO"
AC_MSG_CHECKING([mico settings])
CORBACFLAGS="-I`$MICO --prefix`/include -I.";
CORBA_QMAKE_INCLUDES="`$MICO --prefix`/include -I.";
CORBALIBS="`$MICO --libs`";
AC_MSG_RESULT([$CORBACFLAGS $USE_CORBA $QT_USE_CORBA])
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
AC_CHECK_PROG(USE_CORBA,$ORBIT2,[-DUSE_CORBA -DUSE_ORBIT2],[no])
if test "$USE_CORBA" = "no"; then
AC_MSG_ERROR([failed to find orbit2])
fi
USE_CORBA="-DUSE_CORBA -DUSE_ORBIT"
QT_USE_CORBA="USE_ORBIT2"
CORBACFLAGS=`orbit2-config --cflags`;
# Don't have orbit2-config installed to verify
CORBA_QMAKE_INCLUDES=`orbit2-config --prefix`/include/;
CORBALIBS=`orbit2-config --libs`;
IDLCMD="orbit-idl-2";
DESIRED_CORBA="orbit2"
AC_MSG_ERROR([ORBIT2 is not supported yet])
elif test ! "$WANT_OMNIORB" = "no"; then
if test "$WANT_OMNIORB" = "yes"; then
OMNIORB_LDFLAGS="";
IDLPATH="omniidl";
else
CORBA_QMAKE_INCLUDES="$WANT_OMNIORB/include";
CORBACFLAGS="-I$CORBA_QMAKE_INCLUDES";
IDLPATH="$WANT_OMNIORB/bin/omniidl"
OMNIORB_LDFLAGS="-L'$WANT_OMNIORB/lib'";
fi
AC_PATH_PROG(IDLPATH,$IDLPATH,[no])
if test "$IDLPATH" = "no"; then
AC_MSG_ERROR([failed to find $IDLPATH])
fi
USE_CORBA="-DUSE_CORBA -DUSE_OMNIORB"
# Cannot search for libs (C++ symbols) or includes (automatically generated; may differ between platforms)
IDLCMD="$IDLPATH -bcxx -Wbh=.h -Wbs=.cc";
IDLPYTHONCMD="$IDLPATH -bpython";
QT_USE_CORBA="USE_OMNIORB"
CORBALIBS="$LIBS -lomniORB4 -lomnithread -lpthread"
DESIRED_CORBA="omniorb"
PYTHON_INTERFACE="yes"
else
USE_CORBA="";
CORBACFLAGS="";
CORBALIBS="";
IDLCMD="";
DESIRED_CORBA="none"
fi

AC_MSG_CHECKING([for CORBA]);
AC_MSG_RESULT([$DESIRED_CORBA]);

0 comments on commit 16cfe19

Please sign in to comment.