Ignore:
Timestamp:
Jun 9, 2016, 2:21:26 PM (8 years ago)
Author:
djay
Message:

Fix issue with headers located in extern C. Define java.library.path at runtime to search for libZOO.so from the Java zoo-api.

File:
1 edited

Legend:

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

    r753 r767  
    587587        then
    588588                JAVA_LDFLAGS="-framework JavaVM"
    589                 JAVA_CPPFLAGS="-I/Applications/Xcode.app/Contents/Developer//Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/"
     589                for i in `ls /Applications/Xcode.app/Contents/Developer//Platforms/MacOSX.platform/Developer/SDKs/`; do
     590                    JAVA_CPPFLAGS="-I/Applications/Xcode.app/Contents/Developer//Platforms/MacOSX.platform/Developer/SDKs/$i/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/"
     591                done
    590592        else
    591593                if test -d "$JDKHOME/jre/lib/i386";
     
    594596                        JAVA_CPPFLAGS="-I$JDKHOME/include -I$JDKHOME/include/linux"
    595597                else
    596                         JAVA_LDFLAGS="-L$JDKHOME/jre/lib/amd64/server/ -ljvm -lpthread"
    597                         JAVA_CPPFLAGS="-I$JDKHOME/include -I$JDKHOME/include/linux"
     598                        if test -d "$JDKHOME/jre/lib/amd64"; then
     599                           JAVA_LDFLAGS="-L$JDKHOME/jre/lib/amd64/server/ -ljvm -lpthread"
     600                           JAVA_CPPFLAGS="-I$JDKHOME/include -I$JDKHOME/include/linux"
     601                        else
     602                           JAVA_LDFLAGS="-L$JDKHOME/jre/lib/server/ -ljvm -lpthread"
     603                           JAVA_CPPFLAGS="-I$JDKHOME/include/ -I$JDKHOME/include/darwin"
     604                        fi
    598605                fi
    599606        fi
    600607
     608        AC_LANG([C++])
     609        echo $JAVA_CPPFLAGS
    601610        # Check headers file (second time we check that in fact)
    602611        CPPFLAGS_SAVE="$CPPFLAGS"
     
    604613        AC_CHECK_HEADERS([jni.h],
    605614                         [], [AC_MSG_ERROR([could not find jni.h file])])
    606 
     615        CPPFLAGS="$CPPFLAGS_SAVE"
    607616        # Ensure we can link against libjava
    608617        LIBS_SAVE="$LIBS"
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