[asterisk-commits] branch jcollie/bug7057 r26951 - /team/jcollie/bug7057/

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu May 11 08:13:30 MST 2006


Author: jcollie
Date: Thu May 11 10:13:30 2006
New Revision: 26951

URL: http://svn.digium.com/view/asterisk?rev=26951&view=rev
Log:
Apply latest patch from bug 7057.

Modified:
    team/jcollie/bug7057/Makefile
    team/jcollie/bug7057/acinclude.m4
    team/jcollie/bug7057/configure.ac
    team/jcollie/bug7057/makeopts.in

Modified: team/jcollie/bug7057/Makefile
URL: http://svn.digium.com/view/asterisk/team/jcollie/bug7057/Makefile?rev=26951&r1=26950&r2=26951&view=diff
==============================================================================
--- team/jcollie/bug7057/Makefile (original)
+++ team/jcollie/bug7057/Makefile Thu May 11 10:13:30 2006
@@ -87,10 +87,6 @@
 # Asterisk SMDI integration
 WITH_SMDI=1
 
-# Where to install asterisk after compiling
-# Default -> leave empty
-INSTALL_PREFIX?=
-
 # Staging directory
 # Files are copied here temporarily during the install process
 # For example, make DESTDIR=/tmp/asterisk woud put things in
@@ -114,41 +110,27 @@
 # Define standard directories for various platforms
 # These apply if they are not redefined in asterisk.conf 
 ifeq ($(OSARCH),SunOS)
-  ASTETCDIR=$(INSTALL_PREFIX)/etc/opt/asterisk
-  ASTLIBDIR=$(INSTALL_PREFIX)/opt/asterisk/lib
-  ASTVARLIBDIR=$(INSTALL_PREFIX)/var/opt/asterisk/lib
-  ASTSPOOLDIR=$(INSTALL_PREFIX)/var/opt/asterisk/spool
-  ASTLOGDIR=$(INSTALL_PREFIX)/var/opt/asterisk/log
-  ASTHEADERDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/include/asterisk
-  ASTBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/bin
-  ASTSBINDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/sbin
-  ASTVARRUNDIR=$(INSTALL_PREFIX)/var/opt/asterisk/run
-  ASTMANDIR=$(INSTALL_PREFIX)/opt/asterisk/usr/share/man
+  ASTETCDIR=/etc/opt/asterisk
+  ASTLIBDIR=/opt/asterisk/lib
+  ASTVARLIBDIR=/var/opt/asterisk/lib
+  ASTSPOOLDIR=/var/opt/asterisk/spool
+  ASTLOGDIR=/var/opt/asterisk/log
+  ASTHEADERDIR=/opt/asterisk/usr/include/asterisk
+  ASTBINDIR=/opt/asterisk/usr/bin
+  ASTSBINDIR=/opt/asterisk/usr/sbin
+  ASTVARRUNDIR=/var/opt/asterisk/run
+  ASTMANDIR=/opt/asterisk/usr/share/man
 else
-ifeq ($(OSARCH),FreeBSD)
-  PREFIX?=/usr/local
-  ASTETCDIR=$(INSTALL_PREFIX)$(PREFIX)/etc/asterisk
-  ASTLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/lib/asterisk
-  ASTVARLIBDIR=$(INSTALL_PREFIX)$(PREFIX)/share/asterisk
-  ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
-  ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
-  ASTHEADERDIR=$(INSTALL_PREFIX)$(PREFIX)/include/asterisk
-  ASTBINDIR=$(INSTALL_PREFIX)$(PREFIX)/bin
-  ASTSBINDIR=$(INSTALL_PREFIX)$(PREFIX)/sbin
-  ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
-  ASTMANDIR=$(INSTALL_PREFIX)$(PREFIX)/man
-else
-  ASTETCDIR=$(INSTALL_PREFIX)/etc/asterisk
-  ASTLIBDIR=$(INSTALL_PREFIX)/usr/lib/asterisk
-  ASTVARLIBDIR=$(INSTALL_PREFIX)/var/lib/asterisk
-  ASTSPOOLDIR=$(INSTALL_PREFIX)/var/spool/asterisk
-  ASTLOGDIR=$(INSTALL_PREFIX)/var/log/asterisk
-  ASTHEADERDIR=$(INSTALL_PREFIX)/usr/include/asterisk
-  ASTBINDIR=$(INSTALL_PREFIX)/usr/bin
-  ASTSBINDIR=$(INSTALL_PREFIX)/usr/sbin
-  ASTVARRUNDIR=$(INSTALL_PREFIX)/var/run
-  ASTMANDIR=$(INSTALL_PREFIX)/usr/share/man
-endif
+  ASTETCDIR=$(sysconfdir)/asterisk
+  ASTLIBDIR=$(libdir)/asterisk
+  ASTVARLIBDIR=$(localstatedir)/lib/asterisk
+  ASTSPOOLDIR=$(localstatedir)/spool/asterisk
+  ASTLOGDIR=$(localstatedir)/log/asterisk
+  ASTHEADERDIR=$(includedir)/asterisk
+  ASTBINDIR=$(bindir)
+  ASTSBINDIR=$(sbindir)
+  ASTVARRUNDIR=$(localstatedir)/run
+  ASTMANDIR=$(mandir)
 endif
 ASTDATADIR?=$(ASTVARLIBDIR)
 

Modified: team/jcollie/bug7057/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/jcollie/bug7057/acinclude.m4?rev=26951&r1=26950&r2=26951&view=diff
==============================================================================
--- team/jcollie/bug7057/acinclude.m4 (original)
+++ team/jcollie/bug7057/acinclude.m4 Thu May 11 10:13:30 2006
@@ -20,17 +20,17 @@
 PBX_LIB$1=0
 
 if test "${USE_$1}" != "no"; then
-   libdir=""
+   pbxlibdir=""
    if test "x${$1_DIR}" != "x"; then
-      libdir="-L${$1_DIR}/lib"
+      pbxlibdir="-L${$1_DIR}/lib"
    fi
-   AC_CHECK_LIB([$1], [$2], [:], [], ${libdir} $6)
+   AC_CHECK_LIB([$1], [$2], [:], [], ${pbxlibdir} $6)
 
    if test "${ac_cv_lib_$1_$2}" = "yes"; then
       $1_LIB="-l$1 $6"
       $4_HEADER_FOUND="1"
       if test "x${$1_DIR}" != "x"; then
-         $1_LIB="${libdir} ${$1_LIB}"
+         $1_LIB="${pbxlibdir} ${$1_LIB}"
 	 $1_INCLUDE="-I${$1_DIR}/include"
 	 if test "x$3" != "x" ; then
 	    AC_CHECK_HEADER([${$1_DIR}/include/$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )

Modified: team/jcollie/bug7057/configure.ac
URL: http://svn.digium.com/view/asterisk/team/jcollie/bug7057/configure.ac?rev=26951&r1=26950&r2=26951&view=diff
==============================================================================
--- team/jcollie/bug7057/configure.ac (original)
+++ team/jcollie/bug7057/configure.ac Thu May 11 10:13:30 2006
@@ -22,7 +22,26 @@
 AC_COPYRIGHT("Asterisk")
 AC_REVISION($Revision$)
 
-AC_PREFIX_DEFAULT()
+case "${host}" in
+     *freebsd*)
+     ac_default_prefix=/usr/local
+     ;;
+     *)
+     ac_default_prefix=/usr
+     ;;
+esac
+
+if test ${sysconfdir} = '${prefix}/etc'; then
+   sysconfdir=/etc
+fi
+
+if test ${localstatedir} = '${prefix}/var'; then
+   localstatedir=/var
+fi
+
+if test ${mandir} = '${prefix}/man'; then
+   mandir=/usr/share/man
+fi
 
 ### ** Platform.
 AC_DEFINE_UNQUOTED(PBX_PLATFORM, "${host}",
@@ -251,16 +270,16 @@
 
 if test "${USE_GSM}" != "no"; then
    if test "${GSM_SYSTEM}" = "yes"; then
-      libdir=""
+      gsmlibdir=""
       if test "x${GSM_DIR}" != "x"; then
-         libdir="-L${GSM_DIR}/lib"
+         gsmlibdir="-L${GSM_DIR}/lib"
       fi
       AC_CHECK_LIB([gsm], [gsm_create], AC_DEFINE_UNQUOTED([HAVE_GSM], 1,
-      [Define to indicate the GSM library]), [], ${libdir})
+      [Define to indicate the GSM library]), [], ${gsmlibdir})
       if test "${ac_cv_lib_gsm_gsm_create}" = "yes"; then
 	 gsm_LIB="-lgsm"
 	 if test "x${GSM_DIR}" != "x"; then
-	    gsm_LIB="${libdir} ${gsm_LIB}"
+	    gsm_LIB="${gsmlibdir} ${gsm_LIB}"
 	    gsm_INCLUDE="-I${GSM_DIR}/include"
 	 fi
 	 PBX_LIBgsm=1

Modified: team/jcollie/bug7057/makeopts.in
URL: http://svn.digium.com/view/asterisk/team/jcollie/bug7057/makeopts.in?rev=26951&r1=26950&r2=26951&view=diff
==============================================================================
--- team/jcollie/bug7057/makeopts.in (original)
+++ team/jcollie/bug7057/makeopts.in Thu May 11 10:13:30 2006
@@ -20,7 +20,20 @@
 OSARCH=@PBX_OSTYPE@
 OSREV=@PBX_OSREV@
 
-INSTALL_PREFIX=@prefix@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+datadir = @datadir@
+includedir = @includedir@
+infodir = @infodir@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
 
 AST_DEVMODE=@AST_DEVMODE@
 



More information about the asterisk-commits mailing list