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
3d76189c
Commit
3d76189c
authored
13 years ago
by
Elias Pipping
Committed by
pipping
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Use AS_IF
[[Imported from SVN: r5140]]
parent
c2e8216a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
m4/ipopt.m4
+17
-18
17 additions, 18 deletions
m4/ipopt.m4
with
17 additions
and
18 deletions
m4/ipopt.m4
+
17
−
18
View file @
3d76189c
...
...
@@ -12,20 +12,20 @@ ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LIBS="$LIBS"
## do nothing if --without-amiramesh is used
if
test x$with_ipopt != xno
; then
AS_IF([
test x$with_ipopt != xno
], [
# is --with-ipopt=bla used?
if
test "x$with_ipopt" != x
; then
if
! test -d $with_ipopt
; then
AS_IF([
test "x$with_ipopt" != x
], [
AS_IF([
! test -d $with_ipopt
], [
AC_MSG_WARN([IPOpt directory $with_ipopt does not exist])
else
], [
# expand tilde / other stuff
IPOPTROOT=`cd $with_ipopt && pwd`
fi
fi
if
test "x$IPOPTROOT" = x
; then
])
])
AS_IF([
test "x$IPOPTROOT" = x
], [
# use some default value...
IPOPTROOT="/usr/local/ipopt"
fi
])
IPOPT_LIB_PATH="$IPOPTROOT/lib"
IPOPT_INCLUDE_PATH="$IPOPTROOT/include"
...
...
@@ -34,20 +34,19 @@ if test x$with_ipopt != xno ; then
CPPFLAGS="$CPPFLAGS -I$IPOPT_INCLUDE_PATH"
# Check whether ipopt is installed at all
if
PKG_CONFIG_PATH=$IPOPT_LIB_PATH/pkgconfig $PKG_CONFIG --exists ipopt
; then
AS_IF([
PKG_CONFIG_PATH=$IPOPT_LIB_PATH/pkgconfig $PKG_CONFIG --exists ipopt
], [
IPOPT_CPPFLAGS="-I$IPOPT_INCLUDE_PATH"
HAVE_IPOPT="1"
else
], [
AC_MSG_WARN([IPOpt not found in $IPOPT_ROOT])
fi
])
AC_LANG_PUSH([C++])
CPPFLAGS="$IPOPT_CPPFLAGS"
# if header is found...
if
test x$HAVE_IPOPT = x1
; then
AS_IF([
test x$HAVE_IPOPT = x1
], [
LIBS="$LIBS `PKG_CONFIG_PATH=$IPOPT_LIB_PATH/pkgconfig $PKG_CONFIG --libs ipopt`"
AC_LINK_IFELSE(AC_LANG_PROGRAM(
...
...
@@ -57,14 +56,14 @@ if test x$with_ipopt != xno ; then
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++])
fi
])
with_ipopt="no"
# survived all tests?
if
test x$HAVE_IPOPT = x1
; then
AS_IF([
test x$HAVE_IPOPT = x1
], [
AC_SUBST(IPOPT_LIBS, $IPOPT_LIBS)
AC_SUBST(IPOPT_LDFLAGS, $IPOPT_LDFLAGS)
AC_SUBST(IPOPT_CPPFLAGS, $IPOPT_CPPFLAGS)
...
...
@@ -77,11 +76,11 @@ if test x$HAVE_IPOPT = x1 ; then
# set variable for summary
with_ipopt="yes"
else
], [
AC_SUBST(IPOPT_LIBS, "")
AC_SUBST(IPOPT_LDFLAGS, "")
AC_SUBST(IPOPT_CPPFLAGS, "")
fi
])
# also tell automake
AM_CONDITIONAL(IPOPT, test x$HAVE_IPOPT = x1)
...
...
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