PROJ.4 Build Instructions

Sources

The homepage of the project is: http://trac.osgeo.org/proj/ The sources can be downloaded at: http://download.osgeo.org/proj/proj-4.8.0.tar.gz

wget http://download.osgeo.org/proj/proj-4.8.0.tar.gz

Configure and Build

Patches

Before building apply the following patch in the top directory (should create src/org_proj4_PJ.h ):

   1 --- proj-4.8.0/src/org_proj4_PJ.h.orig 1970-01-01 01:00:00.000000000 +0100
   2 +++ proj-4.8.0/src/org_proj4_PJ.h      2012-03-15 20:12:49.078886235 +0100
   3 @@ -0,0 +1,135 @@
   4 +/* DO NOT EDIT THIS FILE - it is machine generated */
   5 +#include <jni.h>
   6 +/* Header for class org_proj4_PJ */
   7 +
   8 +#ifndef _Included_org_proj4_PJ
   9 +#define _Included_org_proj4_PJ
  10 +#ifdef __cplusplus
  11 +extern "C" {
  12 +#endif
  13 +#undef org_proj4_PJ_DIMENSION_MAX
  14 +#define org_proj4_PJ_DIMENSION_MAX 100L
  15 +/*
  16 + * Class:     org_proj4_PJ
  17 + * Method:    allocatePJ
  18 + * Signature: (Ljava/lang/String;)J
  19 + */
  20 +JNIEXPORT jlong JNICALL Java_org_proj4_PJ_allocatePJ
  21 +  (JNIEnv *, jclass, jstring);
  22 +
  23 +/*
  24 + * Class:     org_proj4_PJ
  25 + * Method:    allocateGeoPJ
  26 + * Signature: (Lorg/proj4/PJ;)J
  27 + */
  28 +JNIEXPORT jlong JNICALL Java_org_proj4_PJ_allocateGeoPJ
  29 +  (JNIEnv *, jclass, jobject);
  30 +
  31 +/*
  32 + * Class:     org_proj4_PJ
  33 + * Method:    getVersion
  34 + * Signature: ()Ljava/lang/String;
  35 + */
  36 +JNIEXPORT jstring JNICALL Java_org_proj4_PJ_getVersion
  37 +  (JNIEnv *, jclass);
  38 +
  39 +/*
  40 + * Class:     org_proj4_PJ
  41 + * Method:    getDefinition
  42 + * Signature: ()Ljava/lang/String;
  43 + */
  44 +JNIEXPORT jstring JNICALL Java_org_proj4_PJ_getDefinition
  45 +  (JNIEnv *, jobject);
  46 +
  47 +/*
  48 + * Class:     org_proj4_PJ
  49 + * Method:    getType
  50 + * Signature: ()Lorg/proj4/PJ$Type;
  51 + */
  52 +JNIEXPORT jobject JNICALL Java_org_proj4_PJ_getType
  53 +  (JNIEnv *, jobject);
  54 +
  55 +/*
  56 + * Class:     org_proj4_PJ
  57 + * Method:    getSemiMajorAxis
  58 + * Signature: ()D
  59 + */
  60 +JNIEXPORT jdouble JNICALL Java_org_proj4_PJ_getSemiMajorAxis
  61 +  (JNIEnv *, jobject);
  62 +
  63 +/*
  64 + * Class:     org_proj4_PJ
  65 + * Method:    getSemiMinorAxis
  66 + * Signature: ()D
  67 + */
  68 +JNIEXPORT jdouble JNICALL Java_org_proj4_PJ_getSemiMinorAxis
  69 +  (JNIEnv *, jobject);
  70 +
  71 +/*
  72 + * Class:     org_proj4_PJ
  73 + * Method:    getEccentricitySquared
  74 + * Signature: ()D
  75 + */
  76 +JNIEXPORT jdouble JNICALL Java_org_proj4_PJ_getEccentricitySquared
  77 +  (JNIEnv *, jobject);
  78 +
  79 +/*
  80 + * Class:     org_proj4_PJ
  81 + * Method:    getAxisDirections
  82 + * Signature: ()[C
  83 + */
  84 +JNIEXPORT jcharArray JNICALL Java_org_proj4_PJ_getAxisDirections
  85 +  (JNIEnv *, jobject);
  86 +
  87 +/*
  88 + * Class:     org_proj4_PJ
  89 + * Method:    getGreenwichLongitude
  90 + * Signature: ()D
  91 + */
  92 +JNIEXPORT jdouble JNICALL Java_org_proj4_PJ_getGreenwichLongitude
  93 +  (JNIEnv *, jobject);
  94 +
  95 +/*
  96 + * Class:     org_proj4_PJ
  97 + * Method:    getLinearUnitToMetre
  98 + * Signature: (Z)D
  99 + */
 100 +JNIEXPORT jdouble JNICALL Java_org_proj4_PJ_getLinearUnitToMetre
 101 +  (JNIEnv *, jobject, jboolean);
 102 +
 103 +/*
 104 + * Class:     org_proj4_PJ
 105 + * Method:    transform
 106 + * Signature: (Lorg/proj4/PJ;I[DII)V
 107 + */
 108 +JNIEXPORT void JNICALL Java_org_proj4_PJ_transform
 109 +  (JNIEnv *, jobject, jobject, jint, jdoubleArray, jint, jint);
 110 +
 111 +/*
 112 + * Class:     org_proj4_PJ
 113 + * Method:    getLastError
 114 + * Signature: ()Ljava/lang/String;
 115 + */
 116 +JNIEXPORT jstring JNICALL Java_org_proj4_PJ_getLastError
 117 +  (JNIEnv *, jobject);
 118 +
 119 +/*
 120 + * Class:     org_proj4_PJ
 121 + * Method:    toString
 122 + * Signature: ()Ljava/lang/String;
 123 + */
 124 +JNIEXPORT jstring JNICALL Java_org_proj4_PJ_toString
 125 +  (JNIEnv *, jobject);
 126 +
 127 +/*
 128 + * Class:     org_proj4_PJ
 129 + * Method:    finalize
 130 + * Signature: ()V
 131 + */
 132 +JNIEXPORT void JNICALL Java_org_proj4_PJ_finalize
 133 +  (JNIEnv *, jobject);
 134 +
 135 +#ifdef __cplusplus
 136 +}
 137 +#endif
 138 +#endif
 139 

module load icc
export JAVA_HOME=/usr/java/default/ # I'm not sure that this is a good ideea (using /usr/java/default)
CFLAGS="-xSSE4.1 -I$JAVA_HOME/include/linux" ./configure --prefix=/u/software/intel/proj.4/proj-4.8.0 --with-jni=$JAVA_HOME/include

InfraGRID/Staff/Software/Proj4Build (last edited 2013-01-18 09:03:43 by MarianNeagul)