install-win32/makeopenvpn
0039dd40
 #!/bin/sh
 
1bda73a7
 H=`pwd`
 
0039dd40
 # get version.nsi definitions
1568d7f4
 . autodefs/defs.sh
0039dd40
 
5449d743
 if gcc --version &>/dev/null && [ -d "$OPENSSL_DIR" ] && [ -d "$LZO_DIR" ] && [ -d "$PKCS11_HELPER_DIR" ]; then
ba865c55
     # build OpenVPN binary
0039dd40
 
1bda73a7
     if ! [ -f Makefile ]; then
 	autoreconf -i -v \
 	&& ./configure \
 	    --enable-strict \
 	    --prefix=$H/windest \
 	    MAN2HTML=true \
 	    --with-ssl-headers=$H/$OPENSSL_DIR/include \
 	    --with-ssl-lib=$H/$OPENSSL_DIR/out \
 	    --with-lzo-headers=$H/$LZO_DIR/include \
 	    --with-lzo-lib=$H/$LZO_DIR \
 	    --with-pkcs11-helper-headers=$H/$PKCS11_HELPER_DIR/usr/local/include \
 	    --with-pkcs11-helper-lib=$H/$PKCS11_HELPER_DIR/usr/local/lib
     fi
 
     make -j $MAKE_JOBS && make install
 
     # copy OpenVPN and service executables to GENOUT/bin
ba865c55
     mkdir -p $GENOUT/bin &>/dev/null
1bda73a7
     cp windest/sbin/openvpn.exe $GENOUT/bin
     cp windest/sbin/openvpnserv.exe $GENOUT/bin
cefe973e
     if [ -z "$NO_STRIP" ]; then
1bda73a7
 	strip $GENOUT/bin/openvpn.exe
 	strip $GENOUT/bin/openvpnserv.exe
cefe973e
     fi
ba865c55
 else
1bda73a7
     echo DID NOT BUILD openvpn.exe and openvpnserv.exe because one or more of gcc, OPENSSL_DIR, LZO_DIR, or PKCS11_HELPER_DIR directories were missing
ba865c55
 fi