Skip to content

Commit

Permalink
- Updated configure/Makefile to work using MacPorts on x86_64
Browse files Browse the repository at this point in the history
  - qmake-mac can be found, and used to generate sendData makefiles
  - omniORB can be found, and used to generate the CORBA communication
- The qtclients were not updated
- The following configure command needs to be provided in MacPorts:
 ./configure '--with-sendData-Qt' '--with-omniORB' 'LDFLAGS=-L/opt/local/lib/' 'CFLAGS=-I/opt/local/include/'
- The following packages should be installed:
  antlr qt4-mac lp_solve omniorb autoconf and probably some more


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5682 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jun 16, 2010
1 parent 8edf4bd commit c901c4c
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 37 deletions.
2 changes: 1 addition & 1 deletion Compiler/omc_debug/Makefile.in
Expand Up @@ -32,7 +32,7 @@ else
CORBALIBS=
endif

LDFLAGS = -lm -L$(RMLHOME)/lib/plain -lrml_g -lpthread $(ANTLR_LIBP) -lantlr $(LIBSOCKET) $(CORBALIBS) $(LIBLPSOLVE55) \
LDFLAGS = @LDFLAGS@ -lm -L$(RMLHOME)/lib/plain -lrml_g -lpthread $(ANTLR_LIBP) -lantlr $(LIBSOCKET) $(CORBALIBS) $(LIBLPSOLVE55) \
-L../../build/lib/omc @LIBSENDDATA_LDFLAGS@

PROG = omcd
Expand Down
2 changes: 1 addition & 1 deletion Compiler/omc_profiler/Makefile.in
Expand Up @@ -29,7 +29,7 @@ else
CORBALIBS=
endif

LDFLAGS = -lm -L$(RMLHOME)/lib/plain -lrml_p $(ANTLR_LIBP) -lantlr $(LIBSOCKET) $(CORBALIBS) $(LIBLPSOLVE55) \
LDFLAGS = @LDFLAGS@ -lm -L$(RMLHOME)/lib/plain -lrml_p $(ANTLR_LIBP) -lantlr $(LIBSOCKET) $(CORBALIBS) $(LIBLPSOLVE55) \
-L../../build/lib/omc @LIBSENDDATA_LDFLAGS@

PROG = omcp
Expand Down
2 changes: 1 addition & 1 deletion Compiler/omc_release/Makefile.in
Expand Up @@ -28,7 +28,7 @@ else
CORBALIBS=
endif

LDFLAGS = -lm -L$(RMLHOME)/lib/plain -lrml $(ANTLR_LIBP) -lantlr $(LIBSOCKET) $(CORBALIBS) $(LIBLPSOLVE55) \
LDFLAGS = @LDFLAGS@ -lm -L$(RMLHOME)/lib/plain -lrml $(ANTLR_LIBP) -lantlr $(LIBSOCKET) $(CORBALIBS) $(LIBLPSOLVE55) \
-L../../build/lib/omc @LIBSENDDATA_LDFLAGS@

PROG = omc
Expand Down
2 changes: 1 addition & 1 deletion Compiler/runtime/Makefile.in
Expand Up @@ -29,7 +29,7 @@ endif
SHELL = /bin/sh
CC = gcc
IDL = @IDLCMD@
CFLAGS += -O3 -I$(RMLINCLUDE) -I$(top_builddir)/c_runtime -I$(srcdir) -I. $(CORBAINCL) -Ilpsolve
CFLAGS += @CFLAGS@ -O3 -I$(RMLINCLUDE) -I$(top_builddir)/c_runtime -I$(srcdir) -I. $(CORBAINCL) -Ilpsolve
CXXFLAGS = $(CFLAGS)
SRC = rtopts.c socketimpl.c printimpl.c systemimpl.c settingsimpl.c dynload.c SimulationResults.c IOStreamExt.c

Expand Down
53 changes: 31 additions & 22 deletions configure
Expand Up @@ -593,7 +593,6 @@ ac_includes_default="\

ac_subst_vars='LTLIBOBJS
LIBOBJS
HAVE_QMAKE
EGREP
GREP
LEXLIB
Expand Down Expand Up @@ -4491,15 +4490,17 @@ $as_echo_n "checking for CORBA... " >&6; };
$as_echo "$DESIRED_CORBA" >&6; };


# Extract the first word of "qmake", so it can be a program name with args.
set dummy qmake; ac_word=$2
for ac_prog in qmake-qt4 qmake qmake-mac
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; 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_HAVE_QMAKE+set}" = set; then :
if test "${ac_cv_prog_QMAKE+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$HAVE_QMAKE"; then
ac_cv_prog_HAVE_QMAKE="$HAVE_QMAKE" # Let the user override the test.
if test -n "$QMAKE"; then
ac_cv_prog_QMAKE="$QMAKE" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
Expand All @@ -4508,34 +4509,39 @@ do
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_HAVE_QMAKE="yes"
ac_cv_prog_QMAKE="$ac_prog"
$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_HAVE_QMAKE" && ac_cv_prog_HAVE_QMAKE="no"
fi
fi
HAVE_QMAKE=$ac_cv_prog_HAVE_QMAKE
if test -n "$HAVE_QMAKE"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_QMAKE" >&5
$as_echo "$HAVE_QMAKE" >&6; }
QMAKE=$ac_cv_prog_QMAKE
if test -n "$QMAKE"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $QMAKE" >&5
$as_echo "$QMAKE" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


test -n "$QMAKE" && break
done
test -n "$QMAKE" || QMAKE=""""

if test "$HAVE_QMAKE" = "no"; then
QMAKE=""
elif test "Darwin" = `uname`; then
QMAKE="qmake -spec macx-g++ -macx -o Makefile"
else
QMAKE="qmake"

if test -n "$QMAKE"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for qmake arguments" >&5
$as_echo_n "checking for qmake arguments... " >&6; }
if test "Darwin" = `uname`; then
QMAKE="$QMAKE -spec macx-g++ -macx -o Makefile"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $QMAKE" >&5
$as_echo "$QMAKE" >&6; }
fi

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendData-Qt" >&5
Expand All @@ -4544,14 +4550,17 @@ $as_echo_n "checking for sendData-Qt... " >&6; };
# Check whether --with-sendData-Qt was given.
if test "${with_sendData_Qt+set}" = set; then :
withval=$with_sendData_Qt;
if test "$HAVE_QMAKE" = "no"; then
if test -z "$QMAKE"; then
as_fn_error "\"Cannot compile with libSendData unless qmake is present.\"" "$LINENO" 5;
fi
LIBSENDDATA="sendData"
if test "Darwin" = `uname`; then
LIBSENDDATA_LDFLAGS="-lsendData -framework QtNetwork -framework QtCore -framework QtGui -lz -framework Carbon"
LIBSENDDATA_LDFLAGS="-lsendData -framework QtNetwork -framework QtCore -framework QtGui -lz -framework Carbon"
if test -d /opt/local/Library/Frameworks/; then
LIBSENDDATA_LDFLAGS="-F/opt/local/Library/Frameworks/ $LIBSENDDATA_LDFLAGS"
fi
else
LIBSENDDATA_LDFLAGS="-lsendData -lQtNetwork -lQtCore -lQtGui"
LIBSENDDATA_LDFLAGS="-lsendData -lQtNetwork -lQtCore -lQtGui"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
$as_echo "ok" >&6; }
Expand All @@ -4573,7 +4582,7 @@ $as_echo_n "checking for libCoin... " >&6; }
# Check whether --with-Coin was given.
if test "${with_Coin+set}" = set; then :
withval=$with_Coin;
if test "$HAVE_QMAKE" = "no"; then
if test -z "$QMAKE"; then
as_fn_error "\"Cannot compile with libCoin unless qmake is present.\"" "$LINENO" 5;
fi
COIN_LIBS=`coin-config --ldflags --libs | tr \\\\n \\ `
Expand Down
25 changes: 14 additions & 11 deletions configure.in
Expand Up @@ -280,27 +280,30 @@ AC_MSG_RESULT([$DESIRED_CORBA]);

dnl Check for Qt

AC_CHECK_PROG(HAVE_QMAKE,qmake,[yes],[no])
AC_CHECK_PROGS(QMAKE,qmake-qt4 qmake qmake-mac,"")

if test "$HAVE_QMAKE" = "no"; then
QMAKE=""
elif test "Darwin" = `uname`; then
QMAKE="qmake -spec macx-g++ -macx -o Makefile"
else
QMAKE="qmake"
if test -n "$QMAKE"; then
AC_MSG_CHECKING([for qmake arguments])
if test "Darwin" = `uname`; then
QMAKE="$QMAKE -spec macx-g++ -macx -o Makefile"
fi
AC_MSG_RESULT([$QMAKE])
fi

AC_MSG_CHECKING([for sendData-Qt]);
AC_ARG_WITH(sendData-Qt, [ --with-sendData-Qt Compile with support for plot().],
[
if test "$HAVE_QMAKE" = "no"; then
if test -z "$QMAKE"; then
AC_MSG_ERROR("Cannot compile with libSendData unless qmake is present.");
fi
LIBSENDDATA="sendData"
if test "Darwin" = `uname`; then
LIBSENDDATA_LDFLAGS="-lsendData -framework QtNetwork -framework QtCore -framework QtGui -lz -framework Carbon"
LIBSENDDATA_LDFLAGS="-lsendData -framework QtNetwork -framework QtCore -framework QtGui -lz -framework Carbon"
if test -d /opt/local/Library/Frameworks/; then
LIBSENDDATA_LDFLAGS="-F/opt/local/Library/Frameworks/ $LIBSENDDATA_LDFLAGS"
fi
else
LIBSENDDATA_LDFLAGS="-lsendData -lQtNetwork -lQtCore -lQtGui"
LIBSENDDATA_LDFLAGS="-lsendData -lQtNetwork -lQtCore -lQtGui"
fi
AC_MSG_RESULT([ok])
],
Expand All @@ -315,7 +318,7 @@ dnl Check for libCoin
AC_MSG_CHECKING([for libCoin])
AC_ARG_WITH(Coin, [ --with-Coin Compile with support for plotting in 3D.],
[
if test "$HAVE_QMAKE" = "no"; then
if test -z "$QMAKE"; then
AC_MSG_ERROR("Cannot compile with libCoin unless qmake is present.");
fi
COIN_LIBS=`coin-config --ldflags --libs | tr \\\\n \\ `
Expand Down

0 comments on commit c901c4c

Please sign in to comment.