forked from cconlon/kerberos-java-gssapi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJavaBuild.sh
executable file
·34 lines (27 loc) · 1.22 KB
/
JavaBuild.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
#
# Description: This shell script generates the Java GSS-API interface for
# the MIT Kerberos libraries and compiles the example client
# and server applications.
# Notes: The paths to Java and Kerberos locations should be updated to match
# the setup of the development machine which this script is being run
# on.
#
# If building on OS X:
#
# 1) The Java include directory is usually similar to:
# /System/Library/Frameworks/JavaVM.framework/Versions/A/Headers
# 2) The shared library extension should be .dylib (libgsswrapper.dylib)
# instead of .so.
#
# Original source developed by yaSSL (http://www.yassl.com)
#
# Create our package directory structure
mkdir -p edu/mit/kerberos
# Generate the SWIG GSS-API interface
swig -java -package edu.mit.kerberos -outdir ./edu/mit/kerberos -o gsswrapper_wrap.c gsswrapper.i
# Compile and link libgsswrapper.so
gcc -c gsswrapper_wrap.c -I/usr/lib/jvm/java-6-openjdk/include -I/usr/local/include/gssapi
gcc -shared gsswrapper_wrap.o -L/usr/local/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkrb5support -o libgsswrapper.so
# Build our example client and server
javac Util.java client.java server.java