Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-solvers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
agnumpde
dune-solvers
Commits
c2e8216a
Commit
c2e8216a
authored
13 years ago
by
Elias Pipping
Committed by
pipping
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Whitespace
[[Imported from SVN: r5139]]
parent
5e39ed4c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
m4/ipopt.m4
+37
-40
37 additions, 40 deletions
m4/ipopt.m4
with
37 additions
and
40 deletions
m4/ipopt.m4
+
37
−
40
View file @
c2e8216a
...
@@ -13,56 +13,53 @@ ac_save_LIBS="$LIBS"
...
@@ -13,56 +13,53 @@ ac_save_LIBS="$LIBS"
## do nothing if --without-amiramesh is used
## do nothing if --without-amiramesh is used
if test x$with_ipopt != xno ; then
if test x$with_ipopt != xno ; then
# is --with-ipopt=bla used?
# is --with-ipopt=bla used?
if test "x$with_ipopt" != x ; then
if test "x$with_ipopt" != x ; then
if ! test -d $with_ipopt; then
if ! test -d $with_ipopt; then
AC_MSG_WARN([IPOpt directory $with_ipopt does not exist])
AC_MSG_WARN([IPOpt directory $with_ipopt does not exist])
else
else
# expand tilde / other stuff
# expand tilde / other stuff
IPOPTROOT=`cd $with_ipopt && pwd`
IPOPTROOT=`cd $with_ipopt && pwd`
fi
fi
if test "x$IPOPTROOT" = x; then
# use some default value...
IPOPTROOT="/usr/local/ipopt"
fi
fi
fi
if test "x$IPOPTROOT" = x; then
# use some default value...
IPOPTROOT="/usr/local/ipopt"
fi
IPOPT_LIB_PATH="$IPOPTROOT/lib"
IPOPT_LIB_PATH="$IPOPTROOT/lib"
IPOPT_INCLUDE_PATH="$IPOPTROOT/include"
IPOPT_INCLUDE_PATH="$IPOPTROOT/include"
LDFLAGS="$LDFLAGS -L$IPOPT_LIB_PATH"
LDFLAGS="$LDFLAGS -L$IPOPT_LIB_PATH"
CPPFLAGS="$CPPFLAGS -I$IPOPT_INCLUDE_PATH"
CPPFLAGS="$CPPFLAGS -I$IPOPT_INCLUDE_PATH"
# Check whether ipopt is installed at all
# Check whether ipopt is installed at all
if PKG_CONFIG_PATH=$IPOPT_LIB_PATH/pkgconfig $PKG_CONFIG --exists ipopt; then
if PKG_CONFIG_PATH=$IPOPT_LIB_PATH/pkgconfig $PKG_CONFIG --exists ipopt; then
IPOPT_CPPFLAGS="-I$IPOPT_INCLUDE_PATH"
IPOPT_CPPFLAGS="-I$IPOPT_INCLUDE_PATH"
HAVE_IPOPT="1"
HAVE_IPOPT="1"
else
else
AC_MSG_WARN([IPOpt not found in $IPOPT_ROOT])
AC_MSG_WARN([IPOpt not found in $IPOPT_ROOT])
fi
fi
AC_LANG_PUSH([C++])
AC_LANG_PUSH([C++])
CPPFLAGS="$IPOPT_CPPFLAGS"
CPPFLAGS="$IPOPT_CPPFLAGS"
# if header is found...
# if header is found...
if test x$HAVE_IPOPT = x1 ; then
if test x$HAVE_IPOPT = x1 ; then
LIBS="$LIBS `PKG_CONFIG_PATH=$IPOPT_LIB_PATH/pkgconfig $PKG_CONFIG --libs ipopt`"
LIBS="$LIBS `PKG_CONFIG_PATH=$IPOPT_LIB_PATH/pkgconfig $PKG_CONFIG --libs ipopt`"
AC_LINK_IFELSE(AC_LANG_PROGRAM(
[#include "coin/IpIpoptApplication.hpp"],
[Ipopt::SmartPtr<Ipopt::IpoptApplication> app = new Ipopt::IpoptApplication();]),
[IPOPT_LIBS="`PKG_CONFIG_PATH=$IPOPT_LIB_PATH/pkgconfig $PKG_CONFIG --libs-only-l ipopt`"
IPOPT_LDFLAGS="`PKG_CONFIG_PATH=$IPOPT_LIB_PATH/pkgconfig $PKG_CONFIG --libs-only-L ipopt`"],
[HAVE_IPOPT="0"
AC_MSG_WARN(IPOpt not found!)])
fi
AC_LANG_POP([C++])
AC_LINK_IFELSE(AC_LANG_PROGRAM(
[#include "coin/IpIpoptApplication.hpp"],
[Ipopt::SmartPtr<Ipopt::IpoptApplication> app = new Ipopt::IpoptApplication();]),
[IPOPT_LIBS="`PKG_CONFIG_PATH=$IPOPT_LIB_PATH/pkgconfig $PKG_CONFIG --libs-only-l ipopt`"
IPOPT_LDFLAGS="`PKG_CONFIG_PATH=$IPOPT_LIB_PATH/pkgconfig $PKG_CONFIG --libs-only-L ipopt`"],
[HAVE_IPOPT="0"
AC_MSG_WARN(IPOpt not found!)])
fi
## end of ipopt check (--without wasn't set
)
AC_LANG_POP([C++]
)
fi
fi
with_ipopt="no"
with_ipopt="no"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment