diff --git a/dune/solvers/solvers/quadraticipopt.hh b/dune/solvers/solvers/quadraticipopt.hh index b1b2732aeefa07fd59570f2f7a0df5574254c6b1..f91600a817a721f87194d2867e2f7e2284fc9089 100644 --- a/dune/solvers/solvers/quadraticipopt.hh +++ b/dune/solvers/solvers/quadraticipopt.hh @@ -19,8 +19,8 @@ #include <dune/solvers/common/canignore.hh> #include <dune/solvers/solvers/iterativesolver.hh> -#include "coin/IpTNLP.hpp" -#include "coin/IpIpoptApplication.hpp" +#include "IpTNLP.hpp" +#include "IpIpoptApplication.hpp" /** \brief Implementation class used to pipe quadratic problems to the IPOpt interior-point solver diff --git a/m4/ipopt.m4 b/m4/ipopt.m4 index 3255ba32c3db4b7ff8a4eae4280fbd260d9ce33a..5a167ae009d7fb53ddf8c60bab55ba0b4380d3ec 100644 --- a/m4/ipopt.m4 +++ b/m4/ipopt.m4 @@ -38,13 +38,11 @@ AS_IF([test x$with_ipopt != xno], [ AC_MSG_WARN([IPOpt not found in $IPOPTROOT]) ]) - dnl FIXME: We have two problems with the information provided by pkg-config: - dnl (1) What we would expect in IPOPT_CPPFLAGS (namely, -I<path>) - dnl ends up in IPOPT_CFLAGS with ipopt 3.10.1 - dnl (2) IPOPT_CFLAGS contain -I<prefix>/include/coin rather than - dnl -I<prefix>/include. We currently include <coin/..> everywhere. - IPOPT_CPPFLAGS="-I$IPOPTROOT/include" - + dnl For some strange reason, PKG_CHECK_MODULES puts the stuff we would expect + dnl in IPOPT_CPPFLAGS (namely, -I<path>)in IPOPT_CFLAGS with ipopt 3.10.1. + dnl We therefore copy it by hand + IPOPT_CPPFLAGS="$IPOPT_CFLAGS" + LDFLAGS="$LDFLAGS $IPOPT_LDFLAGS" CPPFLAGS="$CPPFLAGS $IPOPT_CPPFLAGS" LIBS="$LIBS $IPOPT_LIBS" @@ -54,7 +52,7 @@ AS_IF([test x$with_ipopt != xno], [ # if header is found... AS_IF([test x$HAVE_IPOPT = x1], [ AC_LINK_IFELSE([AC_LANG_PROGRAM( - [#include "coin/IpIpoptApplication.hpp"], + [#include "IpIpoptApplication.hpp"], [Ipopt::SmartPtr<Ipopt::IpoptApplication> app = new Ipopt::IpoptApplication();])], [], [HAVE_IPOPT="0"