summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20
1 files changed, 20 insertions, 0 deletions
diff --git a/configure b/configure
index 6a5a83e..7998572 100755
--- a/configure
+++ b/configure
@@ -419,6 +419,24 @@ EOF
fi
}
+gen_config_hdr()
+{
+ local _version="`git describe --always`"
+ echo "[*] Generating config.h ... "
+
+ cat > config.h << EOF
+#ifndef CONFIG_H
+#define CONFIG_H
+#define FILE_CLIENTS ".curvetun/clients"
+#define FILE_SERVERS ".curvetun/servers"
+#define FILE_PRIVKEY ".curvetun/priv.key"
+#define FILE_PUBKEY ".curvetun/pub.key"
+#define FILE_USERNAM ".curvetun/username"
+#define GITVERSION "$_version"
+#endif /* CONFIG_H */
+EOF
+}
+
echo "# This file is autogenerated by the configure script" > Config
check_pkg_config
@@ -442,6 +460,8 @@ check_libpcap
check_libcli
check_libnet
+gen_config_hdr
+
if [ "$MISSING_DEFS" == "1" ] ; then
echo "[!] Some libraries or header definitions are missing or too old."
echo " Thus certain tools will not be built (see below). Please"