Skip to content

Commit

Permalink
Skip looking for omc build artifacts if we are compiling omc at the s…
Browse files Browse the repository at this point in the history
…ame time
  • Loading branch information
sjoelund committed May 5, 2015
1 parent d41c2b1 commit 1d955ae
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 22 deletions.
2 changes: 1 addition & 1 deletion m4/ombuilddir.m4
@@ -1,5 +1,5 @@
AC_SUBST(OMBUILDDIR)
AC_ARG_WITH(ombuilddir, [ --with-ombuilddir=[build] (where build files are generated; OPENMODELICAHOME)],[OMBUILDDIR="$withval"],[OMBUILDDIR="no"])
AC_ARG_WITH(ombuilddir, [ --with-ombuilddir=[build] (where build files are generated; OPENMODELICAHOME)],[OMBUILDDIR="$withval"; USINGPRESETBUILDDIR="yes"],[OMBUILDDIR="no"])
if test "$OMBUILDDIR" = "no"; then
OMBUILDDIR=$ac_pwd/build
ac_configure_args="$ac_configure_args --with-ombuilddir=$OMBUILDDIR"
Expand Down
48 changes: 27 additions & 21 deletions m4/omhome.m4
@@ -1,5 +1,5 @@
AC_SUBST(OPENMODELICAHOME)
AC_ARG_WITH(openmodelicahome, [ --with-openmodelicahome=[$OPENMODELICAHOME|$PREFIX] (Find OPENMODELICAHOME - the directory where all OpenModelica dependencies are installed.)],[OMHOME="$withval"],[OMHOME=no])
AC_ARG_WITH(openmodelicahome, [ --with-openmodelicahome=[OPENMODELICAHOME|PREFIX] (Find OPENMODELICAHOME - the directory where all OpenModelica dependencies are installed.)],[OMHOME="$withval"],[OMHOME=no])

if echo $host | grep -iq darwin; then
APP=".app"
Expand All @@ -23,35 +23,40 @@ else
fi

define(FIND_OPENMODELICAHOME, [
AC_MSG_CHECKING([for OPENMODELICAHOME])
if test "$OMHOME" = "no"; then
if test -z "$OPENMODELICAHOME"; then
OPENMODELICAHOME="$PREFIX"
if test ! -z "$USINGPRESETBUILDDIR"; then
OPENMODELICAHOME="$OMBUILDDIR"
else
AC_MSG_CHECKING([for OPENMODELICAHOME])
if test "$OMHOME" = "no"; then
if test -z "$OPENMODELICAHOME"; then
OPENMODELICAHOME="$PREFIX"
else
OPENMODELICAHOME="$OPENMODELICAHOME"
fi
else
OPENMODELICAHOME="$OPENMODELICAHOME"
OPENMODELICAHOME="$OMHOME"
fi
else
OPENMODELICAHOME="$OMHOME"
fi
AC_MSG_RESULT($OPENMODELICAHOME)
AC_MSG_RESULT($OPENMODELICAHOME)
AC_MSG_CHECKING([for $OPENMODELICAHOME/lib/omc/ModelicaBuiltin.mo])
if test -f "$OPENMODELICAHOME/lib/omc/ModelicaBuiltin.mo"; then
AC_MSG_RESULT(ok)
else
AC_MSG_ERROR(failed)
fi
AC_MSG_CHECKING([for $OPENMODELICAHOME/lib/omc/ModelicaBuiltin.mo])
if test -f "$OPENMODELICAHOME/lib/omc/ModelicaBuiltin.mo"; then
AC_MSG_RESULT(ok)
else
AC_MSG_ERROR(failed)
fi
AC_MSG_CHECKING([for $OPENMODELICAHOME/share/omc/omc_communication.idl])
if test -f "$OPENMODELICAHOME/share/omc/omc_communication.idl"; then
AC_MSG_RESULT(ok)
else
AC_MSG_ERROR(failed)
AC_MSG_CHECKING([for $OPENMODELICAHOME/share/omc/omc_communication.idl])
if test -f "$OPENMODELICAHOME/share/omc/omc_communication.idl"; then
AC_MSG_RESULT(ok)
else
AC_MSG_ERROR(failed)
fi
fi
])

define(FIND_LIBOPENMODELICACOMPILER, [
if test -z "$USINGPRESETBUILDDIR"; then
AC_LANG_PUSH([C])
AC_MSG_CHECKING([for libOpenModelicaCompiler])
# Note: This does not do a full link. autoconf messes with some env
Expand All @@ -62,4 +67,5 @@ define(FIND_LIBOPENMODELICACOMPILER, [
AC_TRY_LINK([], [], [AC_MSG_RESULT([ok])], [AC_MSG_ERROR([failed])])
LDFLAGS="$LDFLAGS_SAVE"
AC_LANG_POP([C])
fi
])

0 comments on commit 1d955ae

Please sign in to comment.