summaryrefslogtreecommitdiff
path: root/zconfig.h
diff options
context:
space:
mode:
authorcitats <citats@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-03-19 09:10:09 +0000
committercitats <citats@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2004-03-19 09:10:09 +0000
commitd750a2c6207f8e6fb650e1921a03b44010364ea5 (patch)
tree2d65b6590ceb952cdce2102a61e59037dc6681fb /zconfig.h
parent304c2d8ffdf25203392d5f934f8fedc3ec1759da (diff)
Do some auto #define for zaptel based on what the linux kernel was
configured with git-svn-id: http://svn.digium.com/svn/zaptel/trunk@328 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zconfig.h')
-rwxr-xr-xzconfig.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/zconfig.h b/zconfig.h
index da91261..70dbfaf 100755
--- a/zconfig.h
+++ b/zconfig.h
@@ -5,6 +5,11 @@
#ifndef _ZCONFIG_H
#define _ZCONFIG_H
+#ifdef __KERNEL__
+#include <linux/config.h>
+#include <linux/version.h>
+#endif
+
/* Zaptel compile time options */
/*
@@ -50,6 +55,18 @@
*/
/* #define AGGRESSIVE_SUPPRESSOR */
+/* We now use the linux kernel config to detect which options to use */
+/* You can still override them below */
+#ifdef CONFIG_HDLC
+#define CONFIG_ZAPATA_NET
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,20)
+#define CONFIG_OLD_HDLC_API
+#endif
+#endif
+#ifdef CONFIG_PPP
+#define CONFIG_ZAPATA_PPP
+#endif
+
/*
* Uncomment CONFIG_ZAPATA_NET to enable SyncPPP, CiscoHDLC, and Frame Relay
* support.