<h1>Project "FreeSWITCH Source" received a push.</h1>

<h2>branch: master updated</h2>
<pre>
       via: a3b18e5b7cf33bf9de36cb12c953a5b527549a9f (commit)
      from: 39ff78bfae112b2095dd0b8aea1ff46c1d1f5b01 (commit)


</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Stefan Knoblich
comments: 
[SDK] Import autotools version of fs-mod-sdk.
This is a autotools (autoconf/automake/libtool) based skeleton framework for developing
external (= out-of-tree) modules for FreeSWITCH.

Variants of this framework have been used to develop modules like mod_openais, mod_ssh and others.

NOTE: This version of the SDK relies on pkg-config to detect FreeSWITCH
      installations.

Other SDKs for external modules should be added in: &quot;src/mod/sdk/&lt;build-system-name&gt;/&quot;
e.g. a scons-based SDK should be put in: &quot;src/mod/sdk/scons/&quot;

Signed-off-by: Stefan Knoblich &lt;s.knoblich@axsentis.de&gt;
Requested-by: Michal Bielicki - cypromis &lt;michal.bielicki@seventhsignal.de&gt;

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/sdk/autotools/.gitignore b/src/mod/sdk/autotools/.gitignore</span>
new file mode 100644
<span style="color: #000080; font-weight: bold">index 0000000..57b51ac</span>
<span style="color: #A00000">--- /dev/null</span>
<span style="color: #00A000">+++ b/src/mod/sdk/autotools/.gitignore</span>
<span style="color: #800080; font-weight: bold">@@ -0,0 +1,35 @@</span>
<span style="color: #00A000">+*.o</span>
<span style="color: #00A000">+*.lo</span>
<span style="color: #00A000">+*.so</span>
<span style="color: #00A000">+*.a</span>
<span style="color: #00A000">+*.orig</span>
<span style="color: #00A000">+*.rej</span>
<span style="color: #00A000">+*.log</span>
<span style="color: #00A000">+*.la</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+.deps</span>
<span style="color: #00A000">+.libs</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+stamp-h1</span>
<span style="color: #00A000">+samples*</span>
<span style="color: #00A000">+Makefile</span>
<span style="color: #00A000">+Makefile.in</span>
<span style="color: #00A000">+config.log</span>
<span style="color: #00A000">+config.sub</span>
<span style="color: #00A000">+config.guess</span>
<span style="color: #00A000">+config.status</span>
<span style="color: #00A000">+configure</span>
<span style="color: #00A000">+libtool</span>
<span style="color: #00A000">+aclocal.m4</span>
<span style="color: #00A000">+autom4te.cache</span>
<span style="color: #00A000">+depcomp</span>
<span style="color: #00A000">+install-sh</span>
<span style="color: #00A000">+compile</span>
<span style="color: #00A000">+missing</span>
<span style="color: #00A000">+ltmain.sh</span>
<span style="color: #00A000">+doxygen</span>
<span style="color: #00A000">+m4/libtool.m4</span>
<span style="color: #00A000">+m4/ltsugar.m4</span>
<span style="color: #00A000">+m4/ltoptions.m4</span>
<span style="color: #00A000">+m4/ltversion.m4</span>
<span style="color: #00A000">+m4/lt~obsolete.m4</span>
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/sdk/autotools/Makefile.am b/src/mod/sdk/autotools/Makefile.am</span>
new file mode 100644
<span style="color: #000080; font-weight: bold">index 0000000..8f8a25a</span>
<span style="color: #A00000">--- /dev/null</span>
<span style="color: #00A000">+++ b/src/mod/sdk/autotools/Makefile.am</span>
<span style="color: #800080; font-weight: bold">@@ -0,0 +1,4 @@</span>
<span style="color: #00A000">+ACLOCAL_AMFLAGS  = -I m4</span>
<span style="color: #00A000">+AUTOMAKE_OPTIONS = foreign no-dist subdir-objects</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+SUBDIRS = src</span>
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/sdk/autotools/autogen.sh b/src/mod/sdk/autotools/autogen.sh</span>
new file mode 100755
<span style="color: #000080; font-weight: bold">index 0000000..08240fd</span>
<span style="color: #A00000">--- /dev/null</span>
<span style="color: #00A000">+++ b/src/mod/sdk/autotools/autogen.sh</span>
<span style="color: #800080; font-weight: bold">@@ -0,0 +1,2 @@</span>
<span style="color: #00A000">+#!/bin/sh</span>
<span style="color: #00A000">+autoreconf -i -f</span>
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/sdk/autotools/configure.ac b/src/mod/sdk/autotools/configure.ac</span>
new file mode 100644
<span style="color: #000080; font-weight: bold">index 0000000..d4f29f4</span>
<span style="color: #A00000">--- /dev/null</span>
<span style="color: #00A000">+++ b/src/mod/sdk/autotools/configure.ac</span>
<span style="color: #800080; font-weight: bold">@@ -0,0 +1,252 @@</span>
<span style="color: #00A000">+#                                               -*- Autoconf -*-</span>
<span style="color: #00A000">+# Process this file with autoconf to produce a configure script.</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+# website url</span>
<span style="color: #00A000">+m4_define([AC_PACKAGE_URL], [http://www.example.com/])</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+AC_PREREQ([2.61])</span>
<span style="color: #00A000">+AC_INIT([mod_example], [0.0.0], [contact@example.com])</span>
<span style="color: #00A000">+AC_CONFIG_SRCDIR([src/mod_example.c])</span>
<span style="color: #00A000">+AC_CONFIG_MACRO_DIR([m4])</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+AM_INIT_AUTOMAKE([foreign no-dist subdir-objects])</span>
<span style="color: #00A000">+AC_DISABLE_STATIC</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+# disable libtool fortran and c++ checks</span>
<span style="color: #00A000">+m4_defun([_LT_AC_LANG_F77_CONFIG], [:])</span>
<span style="color: #00A000">+m4_defun([_LT_AC_LANG_CXX_CONFIG], [:])</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+# &gt;=automake-1.11</span>
<span style="color: #00A000">+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+# Checks for programs.</span>
<span style="color: #00A000">+AC_PROG_CC</span>
<span style="color: #00A000">+AM_PROG_CC_C_O</span>
<span style="color: #00A000">+AC_PROG_LIBTOOL</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+# pkgconfig</span>
<span style="color: #00A000">+AC_PATH_PROG([PKG_CONFIG], [pkg-config], [&quot;no&quot;])</span>
<span style="color: #00A000">+if test &quot;x${PKG_CONFIG}&quot; = &quot;xno&quot;</span>
<span style="color: #00A000">+then</span>
<span style="color: #00A000">+        AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed in your PATH])</span>
<span style="color: #00A000">+fi</span>
<span style="color: #00A000">+PKG_PROG_PKG_CONFIG</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+# Checks for cflags</span>
<span style="color: #00A000">+AC_MSG_RESULT([${as_nl}&lt;&lt;&gt;&gt; Compiler vendor and features])</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+##</span>
<span style="color: #00A000">+## Compiler vendor and flag checks</span>
<span style="color: #00A000">+##</span>
<span style="color: #00A000">+HAVE_VISIBILITY=&quot;no&quot;</span>
<span style="color: #00A000">+AC_ARG_ENABLE([visibility],</span>
<span style="color: #00A000">+        [AS_HELP_STRING([--disable-visibility], [Disable symbol visibility support (default: enabled, if available)])],</span>
<span style="color: #00A000">+        [case &quot;${enableval}&quot; in</span>
<span style="color: #00A000">+         yes) enable_visibility=&quot;yes&quot; ;;</span>
<span style="color: #00A000">+         no)  enable_visibility=&quot;no&quot; ;;</span>
<span style="color: #00A000">+         *)   AC_MSG_ERROR([Invalid value ${enableval} for parameter --disable-visibility]) ;;</span>
<span style="color: #00A000">+         esac],</span>
<span style="color: #00A000">+        [enable_visibility=&quot;yes&quot;]</span>
<span style="color: #00A000">+)</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+AX_COMPILER_VENDOR</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+case &quot;${ax_cv_c_compiler_vendor}&quot; in</span>
<span style="color: #00A000">+gnu)</span>
<span style="color: #00A000">+        AC_MSG_CHECKING([whether the compiler supports -fvisibility=hidden])</span>
<span style="color: #00A000">+        AS_IF([test &quot;x${enable_visibility}&quot; != &quot;xno&quot;],</span>
<span style="color: #00A000">+                [save_CFLAGS=&quot;${CFLAGS}&quot;</span>
<span style="color: #00A000">+                 CFLAGS=&quot;${CFLAGS} -fvisibility=hidden&quot;</span>
<span style="color: #00A000">+                 AC_COMPILE_IFELSE(</span>
<span style="color: #00A000">+                        [AC_LANG_PROGRAM(</span>
<span style="color: #00A000">+                                [int foo __attribute__ ((visibility(&quot;default&quot;)));],</span>
<span style="color: #00A000">+                                [;]</span>
<span style="color: #00A000">+                        )],</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        [AC_MSG_RESULT([yes])</span>
<span style="color: #00A000">+                         AC_DEFINE([HAVE_VISIBILITY],[1],[GCC visibility support])</span>
<span style="color: #00A000">+                         HAVE_VISIBILITY=&quot;yes&quot;],</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        [AC_MSG_RESULT([no])</span>
<span style="color: #00A000">+                         HAVE_VISIBILITY=&quot;no&quot;]</span>
<span style="color: #00A000">+                 )</span>
<span style="color: #00A000">+                 CFLAGS=&quot;${save_CFLAGS}&quot;],</span>
<span style="color: #00A000">+                [AC_MSG_RESULT([disabled by user])]</span>
<span style="color: #00A000">+        )</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        AS_IF([test &quot;x${HAVE_VISIBILITY}&quot; != &quot;xno&quot;],</span>
<span style="color: #00A000">+                [save_CFLAGS=&quot;${CFLAGS}&quot;</span>
<span style="color: #00A000">+                 CFLAGS=&quot;${CFLAGS} -fvisibility-inlines-hidden&quot;</span>
<span style="color: #00A000">+                 AC_MSG_CHECKING([whether the compiler supports -fvisibility-inlines-hidden])</span>
<span style="color: #00A000">+                 AC_COMPILE_IFELSE(</span>
<span style="color: #00A000">+                        [AC_LANG_PROGRAM(</span>
<span style="color: #00A000">+                                [;], [;]</span>
<span style="color: #00A000">+                        )],</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        [AC_MSG_RESULT([yes])</span>
<span style="color: #00A000">+                         HAVE_VISIBILITY_INLINES_HIDDEN=&quot;yes&quot;],</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        [AC_MSG_RESULT([no])</span>
<span style="color: #00A000">+                         HAVE_VISIBILITY_INLINES_HIDDEN=&quot;no&quot;]</span>
<span style="color: #00A000">+                 )</span>
<span style="color: #00A000">+                 CFLAGS=&quot;${save_CFLAGS}&quot;],</span>
<span style="color: #00A000">+                [:]</span>
<span style="color: #00A000">+        )</span>
<span style="color: #00A000">+        AC_DEFINE([COMPILER_GCC], [1], [Compiler is GCC])</span>
<span style="color: #00A000">+        ;</span>
<span style="color: #00A000">+sun)</span>
<span style="color: #00A000">+        AC_MSG_CHECKING([whether the compiler supports -xldscope=hidden])</span>
<span style="color: #00A000">+        AS_IF([test &quot;x${enable_visibility}&quot; != &quot;xno&quot;],</span>
<span style="color: #00A000">+                [save_CFLAGS=&quot;${CFLAGS}&quot;</span>
<span style="color: #00A000">+                 CFLAGS=&quot;${CFLAGS} -xldscope=hidden&quot;</span>
<span style="color: #00A000">+                 AC_COMPILE_IFELSE(</span>
<span style="color: #00A000">+                        [AC_LANG_PROGRAM(</span>
<span style="color: #00A000">+                                [int foo __attribute__ ((visibility(&quot;default&quot;)));],</span>
<span style="color: #00A000">+                                [;]</span>
<span style="color: #00A000">+                        )],</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        [AC_MSG_RESULT([yes])</span>
<span style="color: #00A000">+                         AC_DEFINE([HAVE_VISIBILITY],[1],[SUNCC visibility support])</span>
<span style="color: #00A000">+                         HAVE_VISIBILITY=&quot;yes&quot;],</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+                        [AC_MSG_RESULT([no])</span>
<span style="color: #00A000">+                         HAVE_VISIBILITY=&quot;no&quot;]</span>
<span style="color: #00A000">+                 )</span>
<span style="color: #00A000">+                 CFLAGS=&quot;${save_CFLAGS}&quot;],</span>
<span style="color: #00A000">+                [AC_MSG_RESULT([disabled by user])]</span>
<span style="color: #00A000">+        )</span>
<span style="color: #00A000">+        AC_DEFINE([COMPILER_SUNCC], [1], [Compiler is SunCC])</span>
<span style="color: #00A000">+        ;</span>
<span style="color: #00A000">+*)</span>
<span style="color: #00A000">+        AC_MSG_WARN([No visibility checks for this compiler defined])</span>
<span style="color: #00A000">+        ;</span>
<span style="color: #00A000">+esac</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+AM_CONDITIONAL([COMPILER_GCC],   [test &quot;x${ax_cv_c_compiler_vendor}&quot; = &quot;xgnu&quot;])</span>
<span style="color: #00A000">+AM_CONDITIONAL([COMPILER_SUNCC], [test &quot;x${ax_cv_c_compiler_vendor}&quot; = &quot;xsun&quot;])</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+AM_CONDITIONAL([HAVE_VISIBILITY], [test &quot;x${HAVE_VISIBILITY}&quot; = &quot;xyes&quot;])</span>
<span style="color: #00A000">+AM_CONDITIONAL([HAVE_VISIBILITY_INLINES_HIDDEN], [test &quot;x${HAVE_VISIBILITY_INLINES_HIDDEN}&quot; = &quot;xyes&quot;])</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+##</span>
<span style="color: #00A000">+## pkgconfig based freeswitch detection code</span>
<span style="color: #00A000">+##</span>
<span style="color: #00A000">+AC_MSG_RESULT([${as_nl}&lt;&lt;&gt;&gt; FreeSWITCH environment])</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+PKG_CHECK_MODULES([freeswitch], [freeswitch],</span>
<span style="color: #00A000">+        [save_LIBS=&quot;${LIBS}&quot;</span>
<span style="color: #00A000">+         save_CFLAGS=&quot;${CFLAGS}&quot;</span>
<span style="color: #00A000">+         save_CPPFLAGS=&quot;${CPPFLAGS}&quot;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+         AC_MSG_CHECKING([FreeSWITCH version])</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+         FREESWITCH_VERSION=&quot;`${PKG_CONFIG} --modversion freeswitch 2&gt;/dev/null`&quot;</span>
<span style="color: #00A000">+         AS_IF([test &quot;x${FREESWITCH_VERSION}&quot; = &quot;x&quot;],</span>
<span style="color: #00A000">+                [AC_MSG_ERROR([failed to get FreeSWITCH version])],</span>
<span style="color: #00A000">+                [AC_MSG_RESULT([$FREESWITCH_VERSION])]</span>
<span style="color: #00A000">+         )</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+         AC_MSG_CHECKING([whether FreeSWITCH ${FREESWITCH_VERSION} is usable])</span>
<span style="color: #00A000">+         CFLAGS=&quot;${freeswitch_CFLAGS}&quot;</span>
<span style="color: #00A000">+         CPPFLAGS=&quot;${freeswitch_CPPFLAGS}&quot;</span>
<span style="color: #00A000">+         LIBS=&quot;${freeswitch_LIBS}&quot;</span>
<span style="color: #00A000">+         AC_TRY_LINK([#include &lt;switch.h&gt;],</span>
<span style="color: #00A000">+                [switch_core_init(0, 0, NULL);],</span>
<span style="color: #00A000">+                [AC_MSG_RESULT([yes])],</span>
<span style="color: #00A000">+                [AC_MSG_RESULT([no])</span>
<span style="color: #00A000">+                 AC_MSG_ERROR([libfreeswitch is unusable, please check config.log for details])]</span>
<span style="color: #00A000">+         )</span>
<span style="color: #00A000">+         LIBS=&quot;${save_LIBS}&quot;</span>
<span style="color: #00A000">+         CFLAGS=&quot;${save_CFLAGS}&quot;</span>
<span style="color: #00A000">+         CPPFLAGS=&quot;${save_CPPFLAGS}&quot;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+         # get locations, critical first</span>
<span style="color: #00A000">+         AC_MSG_CHECKING([for installation prefix])</span>
<span style="color: #00A000">+         FREESWITCH_PREFIX_DIR=&quot;`${PKG_CONFIG} --variable=prefix freeswitch 2&gt;/dev/null`&quot;</span>
<span style="color: #00A000">+         AS_IF(</span>
<span style="color: #00A000">+                [test &quot;x${FREESWITCH_PREFIX_DIR}&quot; = &quot;x&quot;], [AC_MSG_ERROR([unable to get FreeSWITCH prefix directory])],</span>
<span style="color: #00A000">+                [test ! -e &quot;${FREESWITCH_PREFIX_DIR}&quot;], [AC_MSG_ERROR([FreeSWITCH prefix directory ${FREESWITCH_PREFIX_DIR} does not exist])]</span>
<span style="color: #00A000">+         )</span>
<span style="color: #00A000">+         AC_MSG_RESULT([${FREESWITCH_PREFIX_DIR}])</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+         AC_MSG_CHECKING([for modules directory])</span>
<span style="color: #00A000">+         FREESWITCH_MODULES_DIR=&quot;`${PKG_CONFIG} --variable=modulesdir freeswitch 2&gt;/dev/null`&quot;</span>
<span style="color: #00A000">+         AS_IF(</span>
<span style="color: #00A000">+                [test &quot;x${FREESWITCH_MODULES_DIR}&quot; = &quot;x&quot;], [AC_MSG_ERROR([unable to get FreeSWITCH modules directory])],</span>
<span style="color: #00A000">+                [test ! -e &quot;${FREESWITCH_MODULES_DIR}&quot;], [AC_MSG_ERROR([FreeSWITCH modules directory ${FREESWITCH_MODULES_DIR} does not exist])]</span>
<span style="color: #00A000">+         )</span>
<span style="color: #00A000">+         AC_MSG_RESULT([${FREESWITCH_MODULES_DIR}])</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+         AC_MSG_CHECKING([for configuration directory])</span>
<span style="color: #00A000">+         FREESWITCH_CONFIG_DIR=&quot;`${PKG_CONFIG} --variable=sysconfdir freeswitch 2&gt;/dev/null`&quot;</span>
<span style="color: #00A000">+         AS_IF(</span>
<span style="color: #00A000">+                [test &quot;x${FREESWITCH_CONFIG_DIR}&quot; = &quot;x&quot;], [AC_MSG_ERROR([unable to get FreeSWITCH configuration directory])],</span>
<span style="color: #00A000">+                [test ! -e &quot;${FREESWITCH_CONFIG_DIR}&quot;], [AC_MSG_ERROR([FreeSWITCH configuration directory ${FREESWITCH_CONFIG_DIR} does not exist])]</span>
<span style="color: #00A000">+         )</span>
<span style="color: #00A000">+         AC_MSG_RESULT([${FREESWITCH_CONFIG_DIR}])</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+         # non-critical paths</span>
<span style="color: #00A000">+         FREESWITCH_HTDOCS_DIR=&quot;`${PKG_CONFIG} --variable=htdocsdir freeswitch 2&gt;/dev/null`&quot;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+         FREESWITCH_RUNTIME_DIR=&quot;`${PKG_CONFIG} --variable=runtimedir freeswitch 2&gt;/dev/null`&quot;</span>
<span style="color: #00A000">+         FREESWITCH_SCRIPTS_DIR=&quot;`${PKG_CONFIG} --variable=scriptsdir freeswitch 2&gt;/dev/null`&quot;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+         # cflags, libs</span>
<span style="color: #00A000">+         AC_SUBST([FREESWITCH_CFLAGS],   [${freeswitch_CFLAGS}])</span>
<span style="color: #00A000">+         AC_SUBST([FREESWITCH_CPPFLAGS], [${freeswitch_CPPFLAGS}])</span>
<span style="color: #00A000">+         AC_SUBST([FREESWITCH_LIBS],     [${freeswitch_LIBS}])</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+         # version</span>
<span style="color: #00A000">+         AC_SUBST([FREESWITCH_VERSION])</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+         # locations</span>
<span style="color: #00A000">+         AC_SUBST([FREESWITCH_PREFIX_DIR])</span>
<span style="color: #00A000">+         AC_SUBST([FREESWITCH_HTDOCS_DIR])</span>
<span style="color: #00A000">+         AC_SUBST([FREESWITCH_CONFIG_DIR])</span>
<span style="color: #00A000">+         AC_SUBST([FREESWITCH_MODULES_DIR])</span>
<span style="color: #00A000">+         AC_SUBST([FREESWITCH_SCRIPTS_DIR])</span>
<span style="color: #00A000">+         AC_SUBST([FREESWITCH_RUNTIME_DIR])</span>
<span style="color: #00A000">+        ],</span>
<span style="color: #00A000">+        [AC_MSG_ERROR([FreeSWITCH not found])]</span>
<span style="color: #00A000">+)</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+##</span>
<span style="color: #00A000">+## Add your other dependency checks here</span>
<span style="color: #00A000">+##</span>
<span style="color: #00A000">+AC_MSG_RESULT([${as_nl}&lt;&lt;&gt;&gt; Other dependencies])</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+# Checks for header files.</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+# Checks for typedefs, structures, and compiler characteristics.</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+# Checks for library functions.</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+AC_MSG_RESULT([${as_nl}&lt;&lt;&gt;&gt; Create output files])</span>
<span style="color: #00A000">+AC_CONFIG_FILES([Makefile src/Makefile])</span>
<span style="color: #00A000">+AC_OUTPUT</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+AC_MSG_RESULT([</span>
<span style="color: #00A000">+====================== Configuration Summary =====================</span>
<span style="color: #00A000">++ Package</span>
<span style="color: #00A000">+        Name:...................... ${PACKAGE_NAME}</span>
<span style="color: #00A000">+        Version:................... ${PACKAGE_VERSION}</span>
<span style="color: #00A000">+        Bugreports:................ ${PACKAGE_BUGREPORT}</span>
<span style="color: #00A000">+        Website:................... ${PACKAGE_URL}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">++ Compiler</span>
<span style="color: #00A000">+        Vendor:.................... ${ax_cv_c_compiler_vendor}</span>
<span style="color: #00A000">+        Symbol visibility:......... ${HAVE_VISIBILITY}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">++ FreeSWITCH</span>
<span style="color: #00A000">+        Version:................... ${FREESWITCH_VERSION}</span>
<span style="color: #00A000">+        Prefix:.................... ${FREESWITCH_PREFIX_DIR}</span>
<span style="color: #00A000">+        Modules directory:......... ${FREESWITCH_MODULES_DIR}</span>
<span style="color: #00A000">+        Configuration directory:... ${FREESWITCH_CONFIG_DIR}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        Cflags/CPPflags/CXXflags:.. ${FREESWITCH_CFLAGS} ${FREESWITCH_CPPFLAGS}</span>
<span style="color: #00A000">+        LDflags/Libs:.............. ${FREESWITCH_LIBS} ${FREESWITCH_LDFLAGS}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">++ Other</span>
<span style="color: #00A000">+        N/A</span>
<span style="color: #00A000">+==================================================================</span>
<span style="color: #00A000">+])</span>
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/sdk/autotools/m4/ax_compiler_vendor.m4 b/src/mod/sdk/autotools/m4/ax_compiler_vendor.m4</span>
new file mode 100644
<span style="color: #000080; font-weight: bold">index 0000000..a24a58d</span>
<span style="color: #A00000">--- /dev/null</span>
<span style="color: #00A000">+++ b/src/mod/sdk/autotools/m4/ax_compiler_vendor.m4</span>
<span style="color: #800080; font-weight: bold">@@ -0,0 +1,15 @@</span>
<span style="color: #00A000">+AC_DEFUN([AX_COMPILER_VENDOR],</span>
<span style="color: #00A000">+[</span>
<span style="color: #00A000">+AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,</span>
<span style="color: #00A000">+ [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown</span>
<span style="color: #00A000">+  # note: don&#39;t check for gcc first since some other compilers define __GNUC__</span>
<span style="color: #00A000">+  for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do</span>
<span style="color: #00A000">+    vencpp=&quot;defined(&quot;`echo $ventest | cut -d: -f2 | sed &#39;s/,/) || defined(/g&#39;`&quot;)&quot;</span>
<span style="color: #00A000">+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[</span>
<span style="color: #00A000">+#if !($vencpp)</span>
<span style="color: #00A000">+      thisisanerror;</span>
<span style="color: #00A000">+#endif</span>
<span style="color: #00A000">+])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])</span>
<span style="color: #00A000">+  done</span>
<span style="color: #00A000">+ ])</span>
<span style="color: #00A000">+])</span>
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/sdk/autotools/src/Makefile.am b/src/mod/sdk/autotools/src/Makefile.am</span>
new file mode 100644
<span style="color: #000080; font-weight: bold">index 0000000..d2bad5b</span>
<span style="color: #A00000">--- /dev/null</span>
<span style="color: #00A000">+++ b/src/mod/sdk/autotools/src/Makefile.am</span>
<span style="color: #800080; font-weight: bold">@@ -0,0 +1,66 @@</span>
<span style="color: #00A000">+moddir     = @FREESWITCH_MODULES_DIR@</span>
<span style="color: #00A000">+sysconfdir = @FREESWITCH_CONFIG_DIR@</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+###</span>
<span style="color: #00A000">+# Flags</span>
<span style="color: #00A000">+#</span>
<span style="color: #00A000">+AM_CFLAGS  =</span>
<span style="color: #00A000">+AM_CXXFLAGS=</span>
<span style="color: #00A000">+AM_CPPFLAGS= -I. -I$(includedir)</span>
<span style="color: #00A000">+AM_LDFLAGS = -L. -L$(libdir) -avoid-version -module -no-undefined -shared</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+###</span>
<span style="color: #00A000">+# GCC specific flags</span>
<span style="color: #00A000">+#</span>
<span style="color: #00A000">+if COMPILER_GCC</span>
<span style="color: #00A000">+AM_CFLAGS += -Wall</span>
<span style="color: #00A000">+# symbol visibility support</span>
<span style="color: #00A000">+if HAVE_VISIBILITY</span>
<span style="color: #00A000">+AM_CFLAGS  += -fvisibility=hidden</span>
<span style="color: #00A000">+AM_CXXFLAGS+= -fvisibility=hidden</span>
<span style="color: #00A000">+AM_CPPFLAGS+= -DSWITCH_API_VISIBILITY=1</span>
<span style="color: #00A000">+endif</span>
<span style="color: #00A000">+if HAVE_VISIBILITY_INLINES_HIDDEN</span>
<span style="color: #00A000">+AM_CXXFLAGS += -fvisibility-inlines-hidden</span>
<span style="color: #00A000">+endif</span>
<span style="color: #00A000">+endif</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+###</span>
<span style="color: #00A000">+# SunCC specific flags</span>
<span style="color: #00A000">+#</span>
<span style="color: #00A000">+if COMPILER_SUNCC</span>
<span style="color: #00A000">+AM_CFLAGS +=</span>
<span style="color: #00A000">+# symbol visibility support</span>
<span style="color: #00A000">+if HAVE_VISIBILITY</span>
<span style="color: #00A000">+AM_CFLAGS   += -xldscope=hidden</span>
<span style="color: #00A000">+AM_CXXFLAGS += -xldscope=hidden</span>
<span style="color: #00A000">+AM_CPPFLAGS += -DSWITCH_API_VISIBILITY=1</span>
<span style="color: #00A000">+endif</span>
<span style="color: #00A000">+endif</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+###</span>
<span style="color: #00A000">+# add module(s) here, with suffix &#39;.la&#39;</span>
<span style="color: #00A000">+#</span>
<span style="color: #00A000">+mod_LTLIBRARIES = mod_example.la</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+###</span>
<span style="color: #00A000">+# mod_example</span>
<span style="color: #00A000">+#</span>
<span style="color: #00A000">+mod_example_la_SOURCES = mod_example.c</span>
<span style="color: #00A000">+mod_example_la_CFLAGS  = $(AM_CFLAGS) $(FREESWITCH_CFLAGS)</span>
<span style="color: #00A000">+mod_example_la_CPPFLAGS= $(AM_CPPFLAGS) $(FREESWITCH_CPPFLAGS)</span>
<span style="color: #00A000">+mod_example_la_LDFLAGS = $(AM_LDFLAGS)</span>
<span style="color: #00A000">+mod_example_la_LIBADD  = $(FREESWITCH_LIBS)</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+# configuration file</span>
<span style="color: #00A000">+#sysconf_DATA = example.conf.xml</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+#</span>
<span style="color: #00A000">+# install configuration</span>
<span style="color: #00A000">+#</span>
<span style="color: #00A000">+#install-sysconfDATA:</span>
<span style="color: #00A000">+#        $(INSTALL) -d $(DESTDIR)/$(sysconfdir)</span>
<span style="color: #00A000">+#        for x in $(sysconf_DATA); do \</span>
<span style="color: #00A000">+#                test -e $(DESTDIR)$(sysconfdir)/$$x || $(INSTALL) -m644 $$x $(DESTDIR)$(sysconfdir)/$$x ; \</span>
<span style="color: #00A000">+#        done</span>
<span style="color: #000080; font-weight: bold">diff --git a/src/mod/sdk/autotools/src/mod_example.c b/src/mod/sdk/autotools/src/mod_example.c</span>
new file mode 100644
<span style="color: #000080; font-weight: bold">index 0000000..5e7755c</span>
<span style="color: #A00000">--- /dev/null</span>
<span style="color: #00A000">+++ b/src/mod/sdk/autotools/src/mod_example.c</span>
<span style="color: #800080; font-weight: bold">@@ -0,0 +1,84 @@</span>
<span style="color: #00A000">+/*</span>
<span style="color: #00A000">+ * FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application</span>
<span style="color: #00A000">+ * Copyright (C) 2005/2006, Anthony Minessale II &lt;anthmct@yahoo.com&gt;</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * Version: MPL 1.1</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * The contents of this file are subject to the Mozilla Public License Version</span>
<span style="color: #00A000">+ * 1.1 (the &quot;License&quot;); you may not use this file except in compliance with</span>
<span style="color: #00A000">+ * the License. You may obtain a copy of the License at</span>
<span style="color: #00A000">+ * http://www.mozilla.org/MPL/</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * Software distributed under the License is distributed on an &quot;AS IS&quot; basis,</span>
<span style="color: #00A000">+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License</span>
<span style="color: #00A000">+ * for the specific language governing rights and limitations under the</span>
<span style="color: #00A000">+ * License.</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * The Original Code is FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * The Initial Developer of the Original Code is</span>
<span style="color: #00A000">+ * Anthony Minessale II &lt;anthmct@yahoo.com&gt;</span>
<span style="color: #00A000">+ * Portions created by the Initial Developer are Copyright (C)</span>
<span style="color: #00A000">+ * the Initial Developer. All Rights Reserved.</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * Contributor(s):</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * Anthony Minessale II &lt;anthmct@yahoo.com&gt;</span>
<span style="color: #00A000">+ * Neal Horman &lt;neal at wanlink dot com&gt;</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ * mod_example.c -- Framework Demo Module</span>
<span style="color: #00A000">+ *</span>
<span style="color: #00A000">+ */</span>
<span style="color: #00A000">+#include &lt;switch.h&gt;</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+/*</span>
<span style="color: #00A000">+SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_example_shutdown);</span>
<span style="color: #00A000">+SWITCH_MODULE_RUNTIME_FUNCTION(mod_example_runtime);</span>
<span style="color: #00A000">+*/</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+SWITCH_MODULE_LOAD_FUNCTION(mod_example_load);</span>
<span style="color: #00A000">+SWITCH_MODULE_DEFINITION(mod_example, mod_example_load, NULL, NULL);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+SWITCH_MODULE_LOAD_FUNCTION(mod_example_load)</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+        /* connect my internal structure to the blank pointer passed to me */</span>
<span style="color: #00A000">+        *module_interface = switch_loadable_module_create_module_interface(pool, modname);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, &quot;Hello World!\n&quot;);</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+        /* indicate that the module should continue to be loaded */</span>
<span style="color: #00A000">+        return SWITCH_STATUS_SUCCESS;</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+/*</span>
<span style="color: #00A000">+  Called when the system shuts down</span>
<span style="color: #00A000">+SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_example_shutdown);</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+        return SWITCH_STATUS_SUCCESS;</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+*/</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+/*</span>
<span style="color: #00A000">+  If it exists, this is called in it&#39;s own thread when the module-load completes</span>
<span style="color: #00A000">+  If it returns anything but SWITCH_STATUS_TERM it will be called again automaticly</span>
<span style="color: #00A000">+SWITCH_MODULE_RUNTIME_FUNCTION(mod_example_runtime);</span>
<span style="color: #00A000">+{</span>
<span style="color: #00A000">+        while(looping)</span>
<span style="color: #00A000">+        {</span>
<span style="color: #00A000">+                switch_yield(1000);</span>
<span style="color: #00A000">+        }</span>
<span style="color: #00A000">+        return SWITCH_STATUS_TERM;</span>
<span style="color: #00A000">+}</span>
<span style="color: #00A000">+*/</span>
<span style="color: #00A000">+</span>
<span style="color: #00A000">+/* For Emacs:</span>
<span style="color: #00A000">+ * Local Variables:</span>
<span style="color: #00A000">+ * mode:c</span>
<span style="color: #00A000">+ * indent-tabs-mode:nil</span>
<span style="color: #00A000">+ * tab-width:4</span>
<span style="color: #00A000">+ * c-basic-offset:4</span>
<span style="color: #00A000">+ * End:</span>
<span style="color: #00A000">+ * For VIM:</span>
<span style="color: #00A000">+ * vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:</span>
<span style="color: #00A000">+ */</span>
</pre></div>
========================================================================<pre>

Summary of changes:
 src/mod/sdk/autotools/.gitignore                   |   35 +++
 src/mod/sdk/autotools/Makefile.am                  |    4 +
 src/mod/sdk/autotools/autogen.sh                   |    2 +
 src/mod/sdk/autotools/configure.ac                 |  252 ++++++++++++++++++++
 .../mod/sdk/autotools/m4}/ax_compiler_vendor.m4    |    0
 src/mod/sdk/autotools/src/Makefile.am              |   66 +++++
 src/mod/sdk/autotools/src/mod_example.c            |   84 +++++++
 7 files changed, 443 insertions(+), 0 deletions(-)
 create mode 100644 src/mod/sdk/autotools/.gitignore
 create mode 100644 src/mod/sdk/autotools/Makefile.am
 create mode 100755 src/mod/sdk/autotools/autogen.sh
 create mode 100644 src/mod/sdk/autotools/configure.ac
 copy {build/config => src/mod/sdk/autotools/m4}/ax_compiler_vendor.m4 (100%)
 create mode 100644 src/mod/sdk/autotools/src/Makefile.am
 create mode 100644 src/mod/sdk/autotools/src/mod_example.c
</pre>
<p>this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email<br />
For more info, see <a href="http://blog.chomperstomp.com/?p=630">http://blog.chomperstomp.com/?p=630</a>
-- <br />
FreeSWITCH Source</p>