[asterisk-commits] pcadach: branch pcadach/chan_h323-live r40391 - in /team/pcadach/chan_h323-li...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Aug 18 09:52:20 MST 2006


Author: pcadach
Date: Fri Aug 18 11:52:20 2006
New Revision: 40391

URL: http://svn.digium.com/view/asterisk?rev=40391&view=rev
Log:
Improved chan_h323 building again (thanks to ruffer from #asteriskru):
1) Gentoo uses symlinks from "notrace" version of OpenH323 libraries to
   "opt" version (final suffix "n" for "notrace" build, "r" for "opt" build)
   which causes to invalid build of channels/h323/ with "make opt" command.

   To resolve this situation configure script checks OpenH323 library
   directory for _files_ (not symlinks) and tries to choose adequate build
   option for channels/h323/ stuff (by updating channels/h323/Makefile file).

2) Regular "make" builds stuff in channels/h323/ directory too if it is not
   built before (restart of make process is required to pick up OpenH323
   building options generated by make in channels/h323 directory).

3) channels/h323/Makefile.in updated to not pick up pre-defined variables
   coming from parent copy of "make" command when runned by main make process.

Modified:
    team/pcadach/chan_h323-live/acinclude.m4
    team/pcadach/chan_h323-live/channels/Makefile
    team/pcadach/chan_h323-live/channels/h323/Makefile
    team/pcadach/chan_h323-live/channels/h323/Makefile.in
    team/pcadach/chan_h323-live/configure
    team/pcadach/chan_h323-live/configure.ac

Modified: team/pcadach/chan_h323-live/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/acinclude.m4?rev=40391&r1=40390&r2=40391&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/acinclude.m4 (original)
+++ team/pcadach/chan_h323-live/acinclude.m4 Fri Aug 18 11:52:20 2006
@@ -379,3 +379,38 @@
 	   fi
 	fi
 ])
+
+AC_DEFUN(
+[AST_CHECK_OPENH323_BUILD], [
+	if test "${HAS_OPENH323:-unset}" != "unset"; then
+		AC_MSG_CHECKING(OpenH323 build option)
+		OPENH323_SUFFIX=
+		files=`ls -l ${OPENH323_LIBDIR}/libh323_${PWLIB_PLATFORM}_*.so*`
+		libfile=
+		if test -n "$files"; then
+			for f in $files; do
+				if test -f $f -a ! -L $f; then
+					libfile=`basename $f`
+					break;
+				fi
+			done
+		fi
+		if test "${libfile:-unset}" != "unset"; then
+			OPENH323_SUFFIX=`eval "echo ${libfile} | sed -e 's/libh323_${PWLIB_PLATFORM}_\(@<:@^.@:>@*\)\..*/\1/'"`
+		fi
+		case "${OPENH323_SUFFIX}" in
+			n)
+				OPENH323_BUILD="notrace";;
+			r)
+				OPENH323_BUILD="opt";;
+			d)
+				OPENH323_BUILD="debug";;
+			*)
+				OPENH323_BUILD="notrace";;
+		esac
+		AC_MSG_RESULT(${OPENH323_BUILD})
+
+		AC_SUBST([OPENH323_SUFFIX])
+		AC_SUBST([OPENH323_BUILD])
+	fi
+])

Modified: team/pcadach/chan_h323-live/channels/Makefile
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/Makefile?rev=40391&r1=40390&r2=40391&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/Makefile (original)
+++ team/pcadach/chan_h323-live/channels/Makefile Fri Aug 18 11:52:20 2006
@@ -66,6 +66,15 @@
 
 ifneq ($(wildcard h323/Makefile.ast),)
   include h323/Makefile.ast
+else
+h323/libchanh323.a:
+	$(CMD_PREFIX) $(MAKE) -C h323
+	$(CMD_PREFIX) echo "***************************************************************"
+	$(CMD_PREFIX) echo
+	$(CMD_PREFIX) echo "********** Re-run 'make' to pick up H.323 parameters **********"
+	$(CMD_PREFIX) echo
+	$(CMD_PREFIX) echo "***************************************************************"
+	$(CMD_PREFIX) exit 1
 endif
 
 $(eval $(call ast_make_final_host,gentone,gentone.c))

Modified: team/pcadach/chan_h323-live/channels/h323/Makefile
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/h323/Makefile?rev=40391&r1=40390&r2=40391&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/h323/Makefile (original)
+++ team/pcadach/chan_h323-live/channels/h323/Makefile Fri Aug 18 11:52:20 2006
@@ -6,17 +6,20 @@
 
 .PHONY: Makefile.ast
 
+default::	notrace
+
 # Verify those options with main Makefile
-STDCCFLAGS	+= -DNDEBUG
+STDCCFLAGS	= -DNDEBUG
 STDCCFLAGS	+= $(shell grep ^DEBUG_THREADS ../../Makefile | sed -e "s/^DEBUG_THREADS[ 	]*=//" -e "s/\([^\#]*\)\#.*/\1/")
 STDCCFLAGS	+= -I../../include -include "asterisk/autoconfig.h"
 STDCCFLAGS	+= -fPIC
 #OPTCCFLAGS	+=
-CFLAGS		+= -pipe
-TARGET		+= libchanh323.a
+CFLAGS		= -pipe
+TARGET		= libchanh323.a
 TARGET		+= Makefile.ast
 SOURCES		= ast_h323.cxx
 OBJDIR		= .
+OBJS		=
 
 ifndef OPENH323DIR
 OPENH323DIR=/usr/src/OpenH323/openh323
@@ -24,11 +27,14 @@
 
 include $(OPENH323DIR)/openh323u.mak
 
+notrace::
+	$(MAKE) NOTRACE=1 opt
+
 $(SOURCES)::	$(SOURCES:.cxx=.cpp)
-	ln -f $< $@
+	ln -f $(patsubst %.cxx, %.cpp, $@) $@
 
 $(SOURCES)::	Makefile ../../Makefile
-	touch $(SOURCES)
+	touch $@
 
 libchanh323.a:	$(OBJS)
 	ar crv $@ $(OBJS)

Modified: team/pcadach/chan_h323-live/channels/h323/Makefile.in
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/h323/Makefile.in?rev=40391&r1=40390&r2=40391&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/h323/Makefile.in (original)
+++ team/pcadach/chan_h323-live/channels/h323/Makefile.in Fri Aug 18 11:52:20 2006
@@ -6,17 +6,20 @@
 
 .PHONY: Makefile.ast
 
+default::	@OPENH323_BUILD@
+
 # Verify those options with main Makefile
-STDCCFLAGS	+= -DNDEBUG
+STDCCFLAGS	= -DNDEBUG
 STDCCFLAGS	+= $(shell grep ^DEBUG_THREADS ../../Makefile | sed -e "s/^DEBUG_THREADS[ 	]*=//" -e "s/\([^\#]*\)\#.*/\1/")
 STDCCFLAGS	+= -I../../include -include "asterisk/autoconfig.h"
 STDCCFLAGS	+= -fPIC
 #OPTCCFLAGS	+=
-CFLAGS		+= -pipe
-TARGET		+= libchanh323.a
+CFLAGS		= -pipe
+TARGET		= libchanh323.a
 TARGET		+= Makefile.ast
 SOURCES		= ast_h323.cxx
 OBJDIR		= .
+OBJS		=
 
 ifndef OPENH323DIR
 OPENH323DIR=@OPENH323DIR@
@@ -24,11 +27,14 @@
 
 include $(OPENH323DIR)/openh323u.mak
 
+notrace::
+	$(MAKE) NOTRACE=1 opt
+
 $(SOURCES)::	$(SOURCES:.cxx=.cpp)
-	ln -f $< $@
+	ln -f $(patsubst %.cxx, %.cpp, $@) $@
 
 $(SOURCES)::	Makefile ../../Makefile
-	touch $(SOURCES)
+	touch $@
 
 libchanh323.a:	$(OBJS)
 	ar crv $@ $(OBJS)

Modified: team/pcadach/chan_h323-live/configure
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/configure?rev=40391&r1=40390&r2=40391&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/configure (original)
+++ team/pcadach/chan_h323-live/configure Fri Aug 18 11:52:20 2006
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 40379 .
+# From configure.ac Revision: 40380 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.59.
 #
@@ -313,7 +313,7 @@
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os PBX_PLATFORM PBX_CPU PBX_VENDOR PBX_OS UNAME ac_pt_UNAME PBX_OSREV OSISWIN32 PBX_OSTYPE CC ac_ct_CC CXX ac_ct_CXX RANLIB ac_ct_RANLIB AR ac_ct_AR NM ac_ct_NM WINDRES ac_ct_WINDRES DLLWRAP ac_ct_DLLWRAP CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT CXXFLAGS CPP CXXCPP AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S GNU_MAKE GREP FIND COMPRESS BASENAME DIRNAME LN DOT AST_DEVMODE ALSA_LIB ALSA_INCLUDE PBX_ALSA CURSES_LIB CURSES_INCLUDE PBX_CURSES GSM_LIB GSM_INCLUDE PBX_GSM IKSEMEL_LIB IKSEMEL_INCLUDE PBX_IKSEMEL IMAP_TK_LIB IMAP_TK_INCLUDE PBX_IMAP_TK KDE_LIB KDE_INCLUDE PBX_KDE NBS_LIB NBS_INCLUDE PBX_NBS NCURSES_LIB NCURSES_INCLUDE PBX_NCURSES NETSNMP_LIB NETSNMP_INCLUDE PBX_NETSNMP NEWT_LIB NEWT_INCLUDE PBX_NEWT UNIXODBC_LIB UNIXODBC_INCLUDE PBX_UNIXODBC OGG_LIB OGG_INCLUDE PBX_OGG OSPTK_LIB OSPTK_INCLUDE PBX_OSPTK OSS_LIB OSS_INCLUDE PBX_OSS POPT_LIB POPT_INCLUDE PBX_POPT PGSQL_LIB PGSQL_INCLUDE PBX_PGSQL PRI_LIB PRI_INCLUDE PBX_PRI PWLIB_LIB PWLIB_INCLUDE PBX_PWLIB OPENH323_LIB OPENH323_INCLUDE PBX_OPENH323 QT_LIB QT_INCLUDE PBX_QT RADIUS_LIB RADIUS_INCLUDE PBX_RADIUS SPEEX_LIB SPEEX_INCLUDE PBX_SPEEX SQLITE_LIB SQLITE_INCLUDE PBX_SQLITE OPENSSL_LIB OPENSSL_INCLUDE PBX_OPENSSL FREETDS_LIB FREETDS_INCLUDE PBX_FREETDS TERMCAP_LIB TERMCAP_INCLUDE PBX_TERMCAP TINFO_LIB TINFO_INCLUDE PBX_TINFO TONEZONE_LIB TONEZONE_INCLUDE PBX_TONEZONE VORBIS_LIB VORBIS_INCLUDE PBX_VORBIS VPB_LIB VPB_INCLUDE PBX_VPB ZLIB_LIB ZLIB_INCLUDE PBX_ZLIB ZAPTEL_LIB ZAPTEL_INCLUDE PBX_ZAPTEL ALLOCA EGREP LIBOBJS POW_LIB KDEINIT ac_pt_KDEINIT KDEDIR NETSNMP_CONFIG ac_pt_NETSNMP_CONFIG PG_CONFIG ac_pt_PG_CONFIG PTLIB_CONFIG PWLIBDIR PWLIB_INCDIR PWLIB_LIBDIR PWLIB_PLATFORM OPENH323DIR OPENH323_INCDIR OPENH323_LIBDIR QTMOC ac_pt_QTMOC EDITLINE_LIB PBX_H323 PBX_IXJUSER GTKCONFIG ac_ct_GTKCONFIG PBX_GTK GTK_INCLUDE GTK_LIB CURL ac_pt_CURL PBX_CURL CURLLIB LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os PBX_PLATFORM PBX_CPU PBX_VENDOR PBX_OS UNAME ac_pt_UNAME PBX_OSREV OSISWIN32 PBX_OSTYPE CC ac_ct_CC CXX ac_ct_CXX RANLIB ac_ct_RANLIB AR ac_ct_AR NM ac_ct_NM WINDRES ac_ct_WINDRES DLLWRAP ac_ct_DLLWRAP CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT CXXFLAGS CPP CXXCPP AWK INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S GNU_MAKE GREP FIND COMPRESS BASENAME DIRNAME LN DOT AST_DEVMODE ALSA_LIB ALSA_INCLUDE PBX_ALSA CURSES_LIB CURSES_INCLUDE PBX_CURSES GSM_LIB GSM_INCLUDE PBX_GSM IKSEMEL_LIB IKSEMEL_INCLUDE PBX_IKSEMEL IMAP_TK_LIB IMAP_TK_INCLUDE PBX_IMAP_TK KDE_LIB KDE_INCLUDE PBX_KDE NBS_LIB NBS_INCLUDE PBX_NBS NCURSES_LIB NCURSES_INCLUDE PBX_NCURSES NETSNMP_LIB NETSNMP_INCLUDE PBX_NETSNMP NEWT_LIB NEWT_INCLUDE PBX_NEWT UNIXODBC_LIB UNIXODBC_INCLUDE PBX_UNIXODBC OGG_LIB OGG_INCLUDE PBX_OGG OSPTK_LIB OSPTK_INCLUDE PBX_OSPTK OSS_LIB OSS_INCLUDE PBX_OSS POPT_LIB POPT_INCLUDE PBX_POPT PGSQL_LIB PGSQL_INCLUDE PBX_PGSQL PRI_LIB PRI_INCLUDE PBX_PRI PWLIB_LIB PWLIB_INCLUDE PBX_PWLIB OPENH323_LIB OPENH323_INCLUDE PBX_OPENH323 QT_LIB QT_INCLUDE PBX_QT RADIUS_LIB RADIUS_INCLUDE PBX_RADIUS SPEEX_LIB SPEEX_INCLUDE PBX_SPEEX SQLITE_LIB SQLITE_INCLUDE PBX_SQLITE OPENSSL_LIB OPENSSL_INCLUDE PBX_OPENSSL FREETDS_LIB FREETDS_INCLUDE PBX_FREETDS TERMCAP_LIB TERMCAP_INCLUDE PBX_TERMCAP TINFO_LIB TINFO_INCLUDE PBX_TINFO TONEZONE_LIB TONEZONE_INCLUDE PBX_TONEZONE VORBIS_LIB VORBIS_INCLUDE PBX_VORBIS VPB_LIB VPB_INCLUDE PBX_VPB ZLIB_LIB ZLIB_INCLUDE PBX_ZLIB ZAPTEL_LIB ZAPTEL_INCLUDE PBX_ZAPTEL ALLOCA EGREP LIBOBJS POW_LIB KDEINIT ac_pt_KDEINIT KDEDIR NETSNMP_CONFIG ac_pt_NETSNMP_CONFIG PG_CONFIG ac_pt_PG_CONFIG PTLIB_CONFIG PWLIBDIR PWLIB_INCDIR PWLIB_LIBDIR PWLIB_PLATFORM OPENH323DIR OPENH323_INCDIR OPENH323_LIBDIR OPENH323_SUFFIX OPENH323_BUILD QTMOC ac_pt_QTMOC EDITLINE_LIB PBX_H323 PBX_IXJUSER GTKCONFIG ac_ct_GTKCONFIG PBX_GTK GTK_INCLUDE GTK_LIB CURL ac_pt_CURL PBX_CURL CURLLIB LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -19715,8 +19715,6 @@
 	if test ! -z "${OPENH323_DIR}"; then
 		OPENH323DIR="${OPENH323_DIR}"
 	fi
-	PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_r"
-
 
 OPENH323_INCDIR=
 OPENH323_LIBDIR=
@@ -19918,6 +19916,42 @@
 		fi
 	fi
 
+
+	if test "${HAS_OPENH323:-unset}" != "unset"; then
+		echo "$as_me:$LINENO: checking OpenH323 build option" >&5
+echo $ECHO_N "checking OpenH323 build option... $ECHO_C" >&6
+		OPENH323_SUFFIX=
+		files=`ls -l ${OPENH323_LIBDIR}/libh323_${PWLIB_PLATFORM}_*.so*`
+		libfile=
+		if test -n "$files"; then
+			for f in $files; do
+				if test -f $f -a ! -L $f; then
+					libfile=`basename $f`
+					break;
+				fi
+			done
+		fi
+		if test "${libfile:-unset}" != "unset"; then
+			OPENH323_SUFFIX=`eval "echo ${libfile} | sed -e 's/libh323_${PWLIB_PLATFORM}_\([^.]*\)\..*/\1/'"`
+		fi
+		case "${OPENH323_SUFFIX}" in
+			n)
+				OPENH323_BUILD="notrace";;
+			r)
+				OPENH323_BUILD="opt";;
+			d)
+				OPENH323_BUILD="debug";;
+			*)
+				OPENH323_BUILD="notrace";;
+		esac
+		echo "$as_me:$LINENO: result: ${OPENH323_BUILD}" >&5
+echo "${ECHO_T}${OPENH323_BUILD}" >&6
+
+
+
+	fi
+
+	PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}"
 
 	if test "${HAS_OPENH323:-unset}" != "unset"; then
 	   echo "$as_me:$LINENO: checking OpenH323 installation validity" >&5
@@ -25902,6 +25936,8 @@
 s, at OPENH323DIR@,$OPENH323DIR,;t t
 s, at OPENH323_INCDIR@,$OPENH323_INCDIR,;t t
 s, at OPENH323_LIBDIR@,$OPENH323_LIBDIR,;t t
+s, at OPENH323_SUFFIX@,$OPENH323_SUFFIX,;t t
+s, at OPENH323_BUILD@,$OPENH323_BUILD,;t t
 s, at QTMOC@,$QTMOC,;t t
 s, at ac_pt_QTMOC@,$ac_pt_QTMOC,;t t
 s, at EDITLINE_LIB@,$EDITLINE_LIB,;t t

Modified: team/pcadach/chan_h323-live/configure.ac
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/configure.ac?rev=40391&r1=40390&r2=40391&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/configure.ac (original)
+++ team/pcadach/chan_h323-live/configure.ac Fri Aug 18 11:52:20 2006
@@ -688,10 +688,10 @@
 	if test ! -z "${OPENH323_DIR}"; then
 		OPENH323DIR="${OPENH323_DIR}"
 	fi
-	PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_r"
-
 	AST_CHECK_OPENH323()
 	AST_CHECK_PWLIB_VERSION([OpenH323], [OPENH323], [1], [18], [0])
+	AST_CHECK_OPENH323_BUILD()
+	PLATFORM_OPENH323="h323_${PWLIB_PLATFORM}_${OPENH323_SUFFIX}"
 	AST_CHECK_PWLIB_BUILD([OpenH323], [OPENH323],
 		[Define if your system has the OpenH323 libraries.],
 		[#include "ptlib.h"



More information about the asterisk-commits mailing list