Skip to content
Snippets Groups Projects
Commit c2e8216a authored by Elias Pipping's avatar Elias Pipping Committed by pipping
Browse files

Whitespace

[[Imported from SVN: r5139]]
parent 5e39ed4c
Branches
Tags
No related merge requests found
...@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment