Ignore:
Timestamp:
Jan 19, 2017, 3:02:21 PM (7 years ago)
Author:
djay
Message:

Fix issue when building with OTB version upper or equal to 5.8.0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/configure.ac

    r800 r803  
    831831        LDFLAGS_SAVE="$LDFLAGS"
    832832        LIBS="$LIBS_SAVE $OTB_LDFLAGS"
    833         echo $OTB_CPPFLAGS
    834         #AC_CHECK_HEADERS([otbWrapperApplication.h otbWrapperInputImageListParameter.h otbWrapperApplicationRegistry.h],
    835         #               [], [AC_MSG_ERROR([could not find header file $i related to OTB])])
     833        #echo $OTB_CPPFLAGS
     834        AC_CHECK_HEADERS([otbWrapperApplication.h otbWrapperInputImageListParameter.h otbWrapperApplicationRegistry.h],
     835                        [], [AC_MSG_ERROR([could not find header file $i related to OTB])])
    836836        LDFLAGS_SAVE="$LDFLAGS"
    837837        LDFLAGS="$OTB_LDFLAGS"
    838         echo $OTB_LDFLAGS
    839         AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "otbWrapperApplication.h"],[std::vector<std::string> list = otb::Wrapwper::ApplicationRegistry::GetAvailableApplication();]])],
    840                 [AC_MSG_RESULT([checking for GetAvailableApplication... yes])],[AC_MSG_ERROR([checking for GetAvailableApplication... failed])])
     838        #echo $OTB_LDFLAGS
     839        UVERS="$(echo -e '5.8\n$OTBVERS' | sort -r | head -n1)"
     840        if test "$OTBVERS" ==  "$UVERS" ; then
     841                AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "otbWrapperApplicationRegistry.h"]],[[std::vector<std::string> list = otb::Wrapper::ApplicationRegistry::GetAvailableApplications();]])],
     842                                                           [AC_MSG_RESULT([checking for GetAvailableApplications... yes])],[AC_MSG_ERROR([checking for GetAvailableApplications... failed])])
     843        else
     844                AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include "otbWrapperApplication.h"]],[[std::vector<std::string> list = otb::Wrapper::ApplicationRegistry::GetAvailableApplication();]])],
     845                                                           [AC_MSG_RESULT([checking for GetAvailableApplication... yes])],[AC_MSG_ERROR([checking for GetAvailableApplication... failed])])
     846        fi
     847                                                                               
    841848        LDFLAGS="$LDFLAGS_SAVE"
    842849        AC_LANG_POP([C++])
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png