[asterisk-commits] qwell: branch qwell/agi_events r390383 - in /team/qwell/agi_events: ./ includ...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Jun 3 13:56:20 CDT 2013
Author: qwell
Date: Mon Jun 3 13:56:18 2013
New Revision: 390383
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=390383
Log:
Correct autoconf script for finding UUID support.
The library that provides UUID support varies greatly from system to
system. On most Linux distros, it's in libuuid. On OpenBSD, it's in
libe2fs-uuid. On OS X, it is in libsystem.
This patch plays hide-and-seek with UUID support, looking for it in the
three places we know about. It also corrects the Makefile so that it uses
the configured library name and include path.
(closes issue ASTERISK-21816)
Reported by: Brad Latus (snuffy)
Tested by: Brad Latus (snuffy)
........
Merged revisions 390352 from http://svn.asterisk.org/svn/asterisk/trunk
Modified:
team/qwell/agi_events/ (props changed)
team/qwell/agi_events/configure
team/qwell/agi_events/configure.ac
team/qwell/agi_events/include/asterisk/autoconfig.h.in
team/qwell/agi_events/main/Makefile
team/qwell/agi_events/makeopts.in
Propchange: team/qwell/agi_events/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jun 3 13:56:18 2013
@@ -1,1 +1,1 @@
-/trunk:1-390344
+/trunk:1-390382
Modified: team/qwell/agi_events/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/qwell/agi_events/configure.ac?view=diff&rev=390383&r1=390382&r2=390383
==============================================================================
--- team/qwell/agi_events/configure.ac (original)
+++ team/qwell/agi_events/configure.ac Mon Jun 3 13:56:18 2013
@@ -497,8 +497,6 @@
AST_EXT_LIB_CHECK([TINFO], [tinfo], [tgetent], [])
AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h])
AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h])
-AST_EXT_LIB_CHECK([UUID], [uuid], [uuid_generate_random], [uuid/uuid.h], [-luuid])
-AST_EXT_LIB_CHECK([JANSSON], [jansson], [json_dumps], [jansson.h])
EDITLINE_LIB=""
if test "x$TERMCAP_LIB" != "x" ; then
@@ -514,9 +512,31 @@
fi
AC_SUBST(EDITLINE_LIB)
-if test "x$UUID_LIB" == "x"; then
+# Find required UUID support.
+# * -luuid on Linux
+# * -le2fs-uuid on OpenBSD
+# * in libsystem on OS X
+AST_EXT_LIB_CHECK([LIBUUID], [uuid], [uuid_generate_random], [uuid/uuid.h], [])
+AST_EXT_LIB_CHECK([E2FSUUID], [e2fs-uuid], [uuid_generate_random], [uuid/uuid.h], [])
+AC_CHECK_FUNCS([uuid_generate_random], [SYSUUID=true], [SYSUUID=""])
+
+if test "x$LIBUUID_LIB" != "x" ; then
+ UUID_INCLUDE="$LIBUUID_INCLUDE"
+ UUID_LIB="$LIBUUID_LIB"
+elif test "x$E2FSUUID_LIB" != "x" ; then
+ UUID_INCLUDE="$E2FSUUID_INCLUDE"
+ UUID_LIB="$E2FSUUID_LIB"
+elif test "x$SYSUUID" != "x" ; then
+ UUID_INCLUDE=""
+ UUID_LIB=""
+else
AC_MSG_ERROR([*** uuid support not found (this typically means the uuid development package is missing)])
fi
+AC_SUBST(UUID_INCLUDE)
+AC_SUBST(UUID_LIB)
+
+# Find required JSON support.
+AST_EXT_LIB_CHECK([JANSSON], [jansson], [json_dumps], [jansson.h])
if test "x$JANSSON_LIB" == "x"; then
AC_MSG_ERROR([*** JSON support not found (this typically means the libjansson development package is missing)])
Modified: team/qwell/agi_events/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/team/qwell/agi_events/include/asterisk/autoconfig.h.in?view=diff&rev=390383&r1=390382&r2=390383
==============================================================================
--- team/qwell/agi_events/include/asterisk/autoconfig.h.in (original)
+++ team/qwell/agi_events/include/asterisk/autoconfig.h.in Mon Jun 3 13:56:18 2013
@@ -1021,6 +1021,9 @@
/* Define to 1 if `utime(file, NULL)' sets file's timestamp to the present. */
#undef HAVE_UTIME_NULL
+
+/* Define to 1 if you have the `uuid_generate_random' function. */
+#undef HAVE_UUID_GENERATE_RANDOM
/* Define to 1 if your system can support larger than default select bitmasks.
*/
Modified: team/qwell/agi_events/main/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/qwell/agi_events/main/Makefile?view=diff&rev=390383&r1=390382&r2=390383
==============================================================================
--- team/qwell/agi_events/main/Makefile (original)
+++ team/qwell/agi_events/main/Makefile Mon Jun 3 13:56:18 2013
@@ -36,6 +36,7 @@
AST_LIBS+=$(SQLITE3_LIB)
AST_LIBS+=$(ASTSSL_LIBS)
AST_LIBS+=$(JANSSON_LIB)
+AST_LIBS+=$(UUID_LIB)
ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc kfreebsd-gnu),)
ifneq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
@@ -44,7 +45,7 @@
ifneq (x$(CAP_LIB),x)
AST_LIBS+=$(CAP_LIB)
endif
- AST_LIBS+=-lpthread $(EDITLINE_LIB) -lm -lresolv -luuid
+ AST_LIBS+=-lpthread $(EDITLINE_LIB) -lm -lresolv
else
AST_LIBS+=$(EDITLINE_LIB) -lm
endif
@@ -152,6 +153,7 @@
asterisk.o: _ASTCFLAGS+=$(LIBEDIT_INCLUDE)
cli.o: _ASTCFLAGS+=$(LIBEDIT_INCLUDE)
json.o: _ASTCFLAGS+=$(JANSSON_INCLUDE)
+uuid.o: _ASTCFLAGS+=$(UUID_INCLUDE)
ifneq ($(findstring ENABLE_UPLOADS,$(MENUSELECT_CFLAGS)),)
http.o: _ASTCFLAGS+=$(GMIME_INCLUDE)
Modified: team/qwell/agi_events/makeopts.in
URL: http://svnview.digium.com/svn/asterisk/team/qwell/agi_events/makeopts.in?view=diff&rev=390383&r1=390382&r2=390383
==============================================================================
--- team/qwell/agi_events/makeopts.in (original)
+++ team/qwell/agi_events/makeopts.in Mon Jun 3 13:56:18 2013
@@ -290,6 +290,9 @@
UNIXODBC_INCLUDE=@UNIXODBC_INCLUDE@
UNIXODBC_LIB=@UNIXODBC_LIB@
+UUID_INCLUDE=@UUID_INCLUDE@
+UUID_LIB=@UUID_LIB@
+
VORBIS_INCLUDE=@VORBIS_INCLUDE@
VORBIS_LIB=@VORBIS_LIB@
More information about the asterisk-commits
mailing list