summaryrefslogtreecommitdiff
path: root/pjmedia
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2007-01-27 17:44:13 +0000
committerBenny Prijono <bennylp@teluu.com>2007-01-27 17:44:13 +0000
commiteba3e373a6d578348bd373dc02acebe28528f7c1 (patch)
tree24134b47f41bb58e851c7bfa3b238d7eace99d5a /pjmedia
parente3cd40c8069f365a58fefe663d62e0222175e1c9 (diff)
Ticket #82: fix link errors when codecs are disabled from autoconf script
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@909 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia')
-rw-r--r--pjmedia/include/pjmedia-codec/config.h7
-rw-r--r--pjmedia/include/pjmedia-codec/config_auto.h.in59
-rw-r--r--pjmedia/include/pjmedia/config.h10
-rw-r--r--pjmedia/include/pjmedia/config_auto.h.in42
4 files changed, 115 insertions, 3 deletions
diff --git a/pjmedia/include/pjmedia-codec/config.h b/pjmedia/include/pjmedia-codec/config.h
index 85bd7785..4f2f82d3 100644
--- a/pjmedia/include/pjmedia-codec/config.h
+++ b/pjmedia/include/pjmedia-codec/config.h
@@ -21,6 +21,12 @@
#include <pjmedia/types.h>
+/*
+ * Include config_auto.h if autoconf is used (PJ_AUTOCONF is set)
+ */
+#if defined(PJ_AUTOCONF)
+# include <pjmedia-codec/config_auto.h>
+#endif
/**
* Unless specified otherwise, L16 codec is included by default.
@@ -56,3 +62,4 @@
#endif /* __PJMEDIA_CODEC_CONFIG_H__ */
+
diff --git a/pjmedia/include/pjmedia-codec/config_auto.h.in b/pjmedia/include/pjmedia-codec/config_auto.h.in
new file mode 100644
index 00000000..528390cd
--- /dev/null
+++ b/pjmedia/include/pjmedia-codec/config_auto.h.in
@@ -0,0 +1,59 @@
+/* $Id$ */
+/*
+ * Copyright (C) 2003-2006 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef __PJMEDIA_CODEC_CONFIG_AUTO_H_
+#define __PJMEDIA_CODEC_CONFIG_AUTO_H_
+
+/**
+ * @file config_auto.h
+ * @brief PJMEDIA-CODEC configuration as set by autoconf script
+ */
+
+/*
+ * Note:
+ * The configuration in config_site.h overrides any other settings,
+ * including the setting as detected by autoconf.
+ */
+
+/* L16 codec */
+#ifndef PJMEDIA_HAS_L16_CODEC
+#undef PJMEDIA_HAS_L16_CODEC
+#endif
+
+
+/* GSM codec */
+#ifndef PJMEDIA_HAS_GSM_CODEC
+#undef PJMEDIA_HAS_GSM_CODEC
+#endif
+
+
+/* Speex codec */
+#ifndef PJMEDIA_HAS_SPEEX_CODEC
+#undef PJMEDIA_HAS_SPEEX_CODEC
+#endif
+
+
+/* iLBC codec */
+#ifndef PJMEDIA_HAS_ILBC_CODEC
+#undef PJMEDIA_HAS_ILBC_CODEC
+#endif
+
+
+#endif /* __PJMEDIA_CODEC_CONFIG_AUTO_H_ */
+
+
diff --git a/pjmedia/include/pjmedia/config.h b/pjmedia/include/pjmedia/config.h
index fcd2b20a..11bd8df8 100644
--- a/pjmedia/include/pjmedia/config.h
+++ b/pjmedia/include/pjmedia/config.h
@@ -38,6 +38,13 @@
*/
/*
+ * Include config_auto.h if autoconf is used (PJ_AUTOCONF is set)
+ */
+#if defined(PJ_AUTOCONF)
+# include <pjmedia/config_auto.h>
+#endif
+
+/*
* Types of sound stream backends.
*/
@@ -91,9 +98,6 @@
/**
* Unless specified otherwise, G711 codec is included by default.
- * Note that there are parts of G711 codec (such as linear2ulaw) that are
- * needed by other PJMEDIA components (e.g. silence detector, conference).
- * Thus disabling G711 is generally not a good idea.
*/
#ifndef PJMEDIA_HAS_G711_CODEC
# define PJMEDIA_HAS_G711_CODEC 1
diff --git a/pjmedia/include/pjmedia/config_auto.h.in b/pjmedia/include/pjmedia/config_auto.h.in
new file mode 100644
index 00000000..1d792522
--- /dev/null
+++ b/pjmedia/include/pjmedia/config_auto.h.in
@@ -0,0 +1,42 @@
+/* $Id$ */
+/*
+ * Copyright (C) 2003-2006 Benny Prijono <benny@prijono.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#ifndef __PJMEDIA_CONFIG_AUTO_H_
+#define __PJMEDIA_CONFIG_AUTO_H_
+
+/**
+ * @file config_auto.h
+ * @brief PJMEDIA configuration as set by autoconf script
+ */
+
+/*
+ * Note:
+ * The configuration in config_site.h overrides any other settings,
+ * including the setting as detected by autoconf.
+ */
+
+/* G711 codec */
+#ifndef PJMEDIA_HAS_G711_CODEC
+#undef PJMEDIA_HAS_G711_CODEC
+#endif
+
+
+#endif /* __PJMEDIA_CONFIG_AUTO_H_ */
+
+
+