[asterisk-commits] tilghman: trunk r265747 - in /trunk: ./ include/asterisk/ pbx/ res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue May 25 19:29:43 CDT 2010


Author: tilghman
Date: Tue May 25 19:29:40 2010
New Revision: 265747

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=265747
Log:
Use configure to determine the prefixes and include directories properly.

This ensures cross-platform compatibility, even among Linux distributions,
which don't always put headers in the same place.

(closes issue #17391)
 Reported by: loloski

Modified:
    trunk/configure
    trunk/configure.ac
    trunk/include/asterisk/autoconfig.h.in
    trunk/pbx/pbx_lua.c
    trunk/res/res_calendar_caldav.c
    trunk/res/res_calendar_ews.c
    trunk/res/res_calendar_exchange.c
    trunk/res/res_calendar_icalendar.c

Modified: trunk/configure.ac
URL: http://svnview.digium.com/svn/asterisk/trunk/configure.ac?view=diff&rev=265747&r1=265746&r2=265747
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue May 25 19:29:40 2010
@@ -921,10 +921,13 @@
 # Some versions of Linux package iconv in glibc
 AST_EXT_LIB_CHECK([ICONV], [c], [iconv_close], [iconv.h])
 
-AST_EXT_LIB_CHECK([ICAL], [ical], [icaltimezone_new], [ical.h], [${PTHREAD_LIBS}], [${PTHREAD_CFLAGS}])
-
 # Some distributions (like RedHat) add a libical subdirectory for the headers
 AST_EXT_LIB_CHECK([ICAL], [ical], [icaltimezone_get_utc_timezone], [libical/ical.h], [${PTHREAD_LIBS}], [${PTHREAD_CFLAGS}])
+if test x"${PBX_ICAL}" = x1; then
+	ICAL_INCLUDE+=-I/usr/include/libical
+fi
+
+AST_EXT_LIB_CHECK([ICAL], [ical], [icaltimezone_new], [ical.h], [${PTHREAD_LIBS}], [${PTHREAD_CFLAGS}])
 
 AST_EXT_LIB_CHECK([IKSEMEL], [iksemel], [iks_start_sasl], [iksemel.h])
 
@@ -1662,7 +1665,11 @@
 
 AST_EXT_LIB_CHECK([LUA], [lua5.1], [luaL_newstate], [lua5.1/lua.h], [-lm]) 
 if test "x${PBX_LUA}" = "x1" ; then
-	AC_DEFINE_UNQUOTED([LUA51_PREFIX], [1], [Define to 1 if lua is found with a lua5.1 prefix])
+	if test x"${LUA_DIR}" = x; then
+		LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.1"
+	else
+		LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.1"
+	fi
 fi
 	
 # Some distributions (like SuSE) remove the 5.1 suffix.

Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=265747&r1=265746&r2=265747
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Tue May 25 19:29:40 2010
@@ -1019,9 +1019,6 @@
 /* Define to 1 if `lstat' dereferences a symlink specified with a trailing
    slash. */
 #undef LSTAT_FOLLOWS_SLASHED_SYMLINK
-
-/* Define to 1 if lua is found with a lua5.1 prefix */
-#undef LUA51_PREFIX
 
 /* Build chan_misdn for mISDN 1.2 or later. */
 #undef MISDN_1_2

Modified: trunk/pbx/pbx_lua.c
URL: http://svnview.digium.com/svn/asterisk/trunk/pbx/pbx_lua.c?view=diff&rev=265747&r1=265746&r2=265747
==============================================================================
--- trunk/pbx/pbx_lua.c (original)
+++ trunk/pbx/pbx_lua.c Tue May 25 19:29:40 2010
@@ -42,15 +42,9 @@
 #include "asterisk/paths.h"
 #include "asterisk/hashtab.h"
 
-#ifdef LUA51_PREFIX
-#include <lua5.1/lua.h>
-#include <lua5.1/lauxlib.h>
-#include <lua5.1/lualib.h>
-#else
 #include <lua.h>
 #include <lauxlib.h>
 #include <lualib.h>
-#endif
 
 static char *config = "extensions.lua";
 static char *registrar = "pbx_lua";

Modified: trunk/res/res_calendar_caldav.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_calendar_caldav.c?view=diff&rev=265747&r1=265746&r2=265747
==============================================================================
--- trunk/res/res_calendar_caldav.c (original)
+++ trunk/res/res_calendar_caldav.c Tue May 25 19:29:40 2010
@@ -29,11 +29,11 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#include <libical/ical.h>
-#include <neon/ne_session.h>
-#include <neon/ne_uri.h>
-#include <neon/ne_request.h>
-#include <neon/ne_auth.h>
+#include <ical.h>
+#include <ne_session.h>
+#include <ne_uri.h>
+#include <ne_request.h>
+#include <ne_auth.h>
 #include <libxml/xmlmemory.h>
 #include <libxml/parser.h>
 

Modified: trunk/res/res_calendar_ews.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_calendar_ews.c?view=diff&rev=265747&r1=265746&r2=265747
==============================================================================
--- trunk/res/res_calendar_ews.c (original)
+++ trunk/res/res_calendar_ews.c Tue May 25 19:29:40 2010
@@ -27,14 +27,14 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#include <neon/ne_request.h>
-#include <neon/ne_session.h>
-#include <neon/ne_uri.h>
-#include <neon/ne_socket.h>
-#include <neon/ne_auth.h>
-#include <neon/ne_xml.h>
-#include <neon/ne_xmlreq.h>
-#include <neon/ne_utils.h>
+#include <ne_request.h>
+#include <ne_session.h>
+#include <ne_uri.h>
+#include <ne_socket.h>
+#include <ne_auth.h>
+#include <ne_xml.h>
+#include <ne_xmlreq.h>
+#include <ne_utils.h>
 
 #include "asterisk/module.h"
 #include "asterisk/calendar.h"

Modified: trunk/res/res_calendar_exchange.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_calendar_exchange.c?view=diff&rev=265747&r1=265746&r2=265747
==============================================================================
--- trunk/res/res_calendar_exchange.c (original)
+++ trunk/res/res_calendar_exchange.c Tue May 25 19:29:40 2010
@@ -29,11 +29,11 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#include <libical/ical.h>
-#include <neon/ne_session.h>
-#include <neon/ne_uri.h>
-#include <neon/ne_request.h>
-#include <neon/ne_auth.h>
+#include <ical.h>
+#include <ne_session.h>
+#include <ne_uri.h>
+#include <ne_request.h>
+#include <ne_auth.h>
 #include <iksemel.h>
 
 #include "asterisk/module.h"

Modified: trunk/res/res_calendar_icalendar.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_calendar_icalendar.c?view=diff&rev=265747&r1=265746&r2=265747
==============================================================================
--- trunk/res/res_calendar_icalendar.c (original)
+++ trunk/res/res_calendar_icalendar.c Tue May 25 19:29:40 2010
@@ -28,11 +28,11 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
-#include <libical/ical.h>
-#include <neon/ne_session.h>
-#include <neon/ne_uri.h>
-#include <neon/ne_request.h>
-#include <neon/ne_auth.h>
+#include <ical.h>
+#include <ne_session.h>
+#include <ne_uri.h>
+#include <ne_request.h>
+#include <ne_auth.h>
 
 #include "asterisk/module.h"
 #include "asterisk/calendar.h"




More information about the asterisk-commits mailing list