+EOF
+
+if [ $CRYPTO_LIB = "none" ]; then
+ echo "NO_CRYPT_OBJ = 1" >> include.mk
+fi
+
+if [ $INSTALLMANPAGE -eq 1 ]; then
+ echo "MANDIR := $MANDIR" >> include.mk
+ echo "installing manpage"
+else
+ echo "not installing manpage"
+fi
+
+if [ $INSTALLEXAMPLES -eq 1 ]; then
+ echo "EXAMPLESDIR := $EXAMPLESDIR" >> include.mk
+ echo "installing example files"
+else
+ echo "not installing example files"
+fi
+
+VERSION=`cat ../version`
+if which git >/dev/null; then
+ GIT_HASH=`git rev-parse HEAD 2> /dev/null`
+ if [ -n "$GIT_HASH" ]; then
+ VERSION="$VERSION (git $GIT_HASH)"
+ fi
+fi
+
+cat > version.h <<EOF
+/*
+ * uanytun version info
+ *
+ * this file was created automatically
+ * do not edit this file directly
+ * use ./configure instead
+ */
+
+#ifndef UANYTUN_version_h_INCLUDED
+#define UANYTUN_version_h_INCLUDED
+
+#define VERSION_STRING "uanytun version $VERSION"
+#define CRYPTO_LIB_NAME "$CRYPTO_LIB_NAME"
+
+#endif
+