Skip to content

Commit

Permalink
Look for ipopt by default
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17108 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Sep 6, 2013
1 parent 8991fcb commit 911461d
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions configure.in
Expand Up @@ -410,18 +410,20 @@ dnl should we use ipopt?

AC_ARG_WITH(ipopt, [ --with-ipopt=DIR use ipopt for initialization],
[
WANT_IPOPT="$withval"
], [
WANT_IPOPT="yes"
])

if test "$withval" = "yes"; then
AC_CHECK_HEADERS(coin/IpStdCInterface.h, [IPOPT_LDFLAGS="-lipopt -lcoinmumps"; IPOPT_CFLAGS=""], [NO_IPOPT="yes"])
else
IPOPT_DIR="$withval"
AC_CHECK_HEADERS($IPOPT_DIR/include/coin/IpStdCInterface.h, [AC_MSG_RESULT(ipopt directory: $IPOPT_DIR); IPOPT_LDFLAGS="-L'"$IPOPT_DIR"/lib' -lipopt -lcoinmumps"; IPOPT_CFLAGS="-I'"$IPOPT_DIR"/include'"], [NO_IPOPT="yes"])
fi
], [
WANT_IPOPT="no"
if test "$WANT_IPOPT" = "yes"; then
AC_CHECK_HEADERS(coin/IpStdCInterface.h, [IPOPT_LDFLAGS="-lipopt"; IPOPT_CFLAGS=""], [NO_IPOPT="yes"])
elif test "$WANT_IPOPT" = "no"; then
NO_IPOPT="yes"
])
else
IPOPT_DIR="$withval"
AC_CHECK_HEADERS($IPOPT_DIR/include/coin/IpStdCInterface.h, [AC_MSG_RESULT(ipopt directory: $IPOPT_DIR); IPOPT_LDFLAGS="-L'"$IPOPT_DIR"/lib' -lipopt"; IPOPT_CFLAGS="-I'"$IPOPT_DIR"/include'"], [NO_IPOPT="yes"])
fi


if ! test "$NO_IPOPT" = "yes"; then
FINAL_MESSAGES="$FINAL_MESSAGES\nSimulations may use IPOPT: Yes"
Expand Down

0 comments on commit 911461d

Please sign in to comment.