From 1b10b866b8d9455076d5ac33da4b5f70036d5db9 Mon Sep 17 00:00:00 2001 From: Luigi Rizzo <rizzo@icir.org> Date: Fri, 19 Jan 2007 15:48:13 +0000 Subject: [PATCH] Add a stub file to find the zaptel headers in the right place, rather than repeating the check on every single file. Changes to the individual files are coming. The header file name has been suggested by kevin. Approved by: kpfleming git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51290 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/zapata.h | 45 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 include/asterisk/zapata.h diff --git a/include/asterisk/zapata.h b/include/asterisk/zapata.h new file mode 100644 index 0000000000..503d999bb7 --- /dev/null +++ b/include/asterisk/zapata.h @@ -0,0 +1,45 @@ +/* + * Asterisk -- An open source telephony toolkit. + * + * Copyright (C) 2007, Digium, Inc. + * + * See http://www.asterisk.org for more information about + * the Asterisk project. Please do not directly contact + * any of the maintainers of this project for assistance; + * the project provides a web site, mailing lists and IRC + * channels for your use. + * + * This program is free software, distributed under the terms of + * the GNU General Public License Version 2. See the LICENSE file + * at the top of the source tree. + * + * Sometimes one really wonders why we need a copyright + * for less than ten lines of preprocessor directives... + */ + +/* + * Stub to find the zaptel headers. The configure script will + * define HAVE_ZAPTEL_VERSION according to what it has found. + * Applications should include "zapata.h" and not (directly) + * <foo/zaptel.h> or <foo/tonezone.h>. + * For the mapping of version numbers to location see below. + * + */ +#ifndef _AST_ZAPATA_H +#define _AST_ZAPATA_H + +#ifdef HAVE_ZAPTEL +#include <sys/ioctl.h> + +#if defined(HAVE_ZAPTEL_VERSION) && HAVE_ZAPTEL_VERSION < 100 +/* Very old versions of zaptel drivers on FreeBSD install in ${PREFIX} */ +#include <zaptel.h> +#include <tonezone.h> +#else +/* newer versions install in ${PREFIX}/zaptel */ +#include <zaptel/zaptel.h> +#endif /* HAVE_ZAPTEL_VERSION < 100 */ + +#endif /* HAVE_ZAPTEL */ + +#endif /* _AST_ZAPATA_H */ -- GitLab