[asterisk-commits] kharwell: branch kharwell/pimp_sip_security r390375 - in /team/kharwell/pimp_...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 3 11:43:41 CDT 2013


Author: kharwell
Date: Mon Jun  3 11:43:39 2013
New Revision: 390375

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=390375
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 file:///srv/subversion/repos/asterisk/trunk
........

Merged revisions 390355 from http://svn.asterisk.org/svn/asterisk/team/group/pimp_my_sip

Modified:
    team/kharwell/pimp_sip_security/   (props changed)
    team/kharwell/pimp_sip_security/configure
    team/kharwell/pimp_sip_security/configure.ac
    team/kharwell/pimp_sip_security/include/asterisk/autoconfig.h.in
    team/kharwell/pimp_sip_security/main/Makefile
    team/kharwell/pimp_sip_security/makeopts.in

Propchange: team/kharwell/pimp_sip_security/
------------------------------------------------------------------------------
--- pimp_sip_security-integrated (original)
+++ pimp_sip_security-integrated Mon Jun  3 11:43:39 2013
@@ -1,1 +1,1 @@
-/team/group/pimp_my_sip:1-390320
+/team/group/pimp_my_sip:1-390374

Propchange: team/kharwell/pimp_sip_security/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jun  3 11:43:39 2013
@@ -1,1 +1,1 @@
-/trunk:1-390318
+/trunk:1-390354

Modified: team/kharwell/pimp_sip_security/configure.ac
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_security/configure.ac?view=diff&rev=390375&r1=390374&r2=390375
==============================================================================
--- team/kharwell/pimp_sip_security/configure.ac (original)
+++ team/kharwell/pimp_sip_security/configure.ac Mon Jun  3 11:43:39 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/kharwell/pimp_sip_security/include/asterisk/autoconfig.h.in
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_security/include/asterisk/autoconfig.h.in?view=diff&rev=390375&r1=390374&r2=390375
==============================================================================
--- team/kharwell/pimp_sip_security/include/asterisk/autoconfig.h.in (original)
+++ team/kharwell/pimp_sip_security/include/asterisk/autoconfig.h.in Mon Jun  3 11:43:39 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/kharwell/pimp_sip_security/main/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_security/main/Makefile?view=diff&rev=390375&r1=390374&r2=390375
==============================================================================
--- team/kharwell/pimp_sip_security/main/Makefile (original)
+++ team/kharwell/pimp_sip_security/main/Makefile Mon Jun  3 11:43:39 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/kharwell/pimp_sip_security/makeopts.in
URL: http://svnview.digium.com/svn/asterisk/team/kharwell/pimp_sip_security/makeopts.in?view=diff&rev=390375&r1=390374&r2=390375
==============================================================================
--- team/kharwell/pimp_sip_security/makeopts.in (original)
+++ team/kharwell/pimp_sip_security/makeopts.in Mon Jun  3 11:43:39 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