russell: trunk r151 - in /trunk: ./ build_tools/ tools/
asterisk-gui-commits at lists.digium.com
asterisk-gui-commits at lists.digium.com
Thu Dec 7 04:50:26 MST 2006
Author: russell
Date: Thu Dec 7 05:50:25 2006
New Revision: 151
URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=151
Log:
Add a configure script and make a bunch of significant changes to the Makefiles.
This solves a couple different bugs that have been reported.
- Don't try to build zapscan if zaptel is not installed. (issue #8522)
- Use platform specific CFLAGS and install locations.
(issue #8490, initial patch by pabelanger, but the committed fix is different)
Added:
trunk/acinclude.m4
trunk/bootstrap.sh (with props)
trunk/build_tools/
trunk/build_tools/make_version (with props)
trunk/config.guess (with props)
trunk/config.sub (with props)
trunk/configure (with props)
trunk/configure.ac
trunk/install-sh (with props)
trunk/makeopts.in
trunk/missing (with props)
Modified:
trunk/ (props changed)
trunk/Makefile
trunk/tools/ (props changed)
trunk/tools/Makefile
Propchange: trunk/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Dec 7 05:50:25 2006
@@ -1,0 +1,5 @@
+makeopts
+config.log
+config.status
+autom4te.cache
+aclocal.m4
Modified: trunk/Makefile
URL: http://svn.digium.com/view/asterisk-gui/trunk/Makefile?view=diff&rev=151&r1=150&r2=151
==============================================================================
--- trunk/Makefile (original)
+++ trunk/Makefile Thu Dec 7 05:50:25 2006
@@ -11,16 +11,31 @@
# the GNU General Public License
#
-# Basics...
-INSTALL?=install
-BASENAME?=basename
-
+# even though we could use '-include makeopts' here, use a wildcard
+# lookup anyway, so that make won't try to build makeopts if it doesn't
+# exist (other rules will force it to be built if needed)
+ifneq ($(wildcard makeopts),)
+ include makeopts
+endif
+
+export CC
+export CPP
export INSTALL
export DESTDIR
export BASENAME
+export PBX_ZAPTEL
+export ZAPTEL_INCLUDE
+export ASTSBINDIR
+export ASTCFLAGS
+export ASTLDFLAGS
+
+ifneq ($(findstring BSD,$(OSARCH)),)
+ ASTCFLAGS+=-I/usr/local/include
+ ASTLDFLAGS+=-L/usr/local/lib
+endif
# Overwite config files on "make samples"
-OVERWRITE=y
+OVERWRITE:=y
# Staging directory
# Files are copied here temporarily during the install process
@@ -28,49 +43,74 @@
# /tmp/asterisk/etc/asterisk
# !!! Watch out, put no spaces or comments after the value !!!
#DESTDIR?=/tmp/asterisk-gui
-#
-# Asterisk var/lib directory...
-#
-ASTVARLIB?=$(shell cat $(DESTDIR)/etc/asterisk/asterisk.conf 2>/dev/null | grep -v ^\; | grep astvarlibdir | cut -f 3 -d ' ')
-ifeq ($(ASTVARLIB),)
- ASTVARLIB=/var/lib/asterisk
-endif
-ASTETCDIR?=$(shell cat $(DESTDIR)/etc/asterisk/asterisk.conf 2>/dev/null | grep -v ^\; | grep astetcdir | cut -f 3 -d ' ')
+
+ifeq ($(OSARCH),SunOS)
+ ASTETCDIR:=$(DESTDIR)/var/etc/asterisk
+else
+ ASTETCDIR:=$(DESTDIR)$(sysconfdir)/asterisk
+endif
+ASTETCDIR:=$(shell cat $(ASTETCDIR) 2>/dev/null | grep -v ^\; | grep astetcdir | cut -f 3 -d ' ')
ifeq ($(ASTETCDIR),)
- ASTETCDIR=/etc/asterisk
-endif
-HTTPDIR=$(DESTDIR)$(ASTVARLIB)/static-http
-CONFIGDIR=$(HTTPDIR)/config
-ASTETCDIR?=$(shell cat $(DESTDIR)/etc/asterisk/asterisk.conf 2>/dev/null | grep -v ^\; | grep astetcdir | cut -f 3 -d ' ')
-ifeq ($(ASTETCDIR),)
- ASTETCDIR=/etc/asterisk
-endif
+ ifeq ($(OSARCH),SunOS)
+ ASTETCDIR:=$(DESTDIR)/var/etc/asterisk
+ else
+ ASTETCDIR:=$(DESTDIR)$(sysconfdir)/asterisk
+ endif
+endif
+
+ASTVARLIBDIR?=$(shell cat $(ASTETCDIR) 2>/dev/null | grep -v ^\; | grep astvarlibdir | cut -f 3 -d ' ')
+ifeq ($(ASTVARLIBDIR),)
+ ifeq ($(OSARCH),SunOS)
+ ASTVARLIBDIR:=$(DESTDIR)/var/opt/asterisk
+ else
+ ifeq ($(OSARCH),FreeBSD)
+ ASTVARLIBDIR:=$(DESTDIR)$(prefix)/share/asterisk
+ else
+ ASTVARLIBDIR:=$(DESTDIR)$(localstatedir)/lib/asterisk
+ endif
+ endif
+endif
+
+
+ASTSBINDIR?=$(shell cat $(ASTETCDIR) 2>/dev/null | grep -v ^\; | grep astsbindir | cut -f 3 -d ' ')
+ifeq ($(ASTSBINDIR),)
+ ifeq ($(OSARCH),SunOS)
+ ASTSBINDIR:=$(DESTDIR)/opt/asterisk/sbin
+ else
+ ASTSBINDIR:=$(DESTDIR)$(sbindir)
+ endif
+endif
+
+HTTPDIR:=$(DESTDIR)$(ASTVARLIBDIR)/static-http
+CONFIGDIR:=$(HTTPDIR)/config
+
HTTPHOST?=$(shell hostname)
-HTTPBINDPORT?=$(shell cat $(DESTDIR)/etc/asterisk/http.conf 2>/dev/null | grep -v ^\; | grep bindport | cut -f 2 -d '=')
+HTTPBINDPORT?=$(shell cat $(ASTETCDIR)/http.conf 2>/dev/null | grep -v ^\; | grep bindport | cut -f 2 -d '=')
ifeq ($(HTTPBINDPORT),)
- HTTPBINDPORT=8088
-endif
-HTTPPREFIXBASE?=$(shell cat $(DESTDIR)/etc/asterisk/http.conf 2>/dev/null | grep -v ^\; | grep prefix )
+ HTTPBINDPORT:=8088
+endif
+HTTPPREFIXBASE?=$(shell cat $(ASTETCDIR)/http.conf 2>/dev/null | grep -v ^\; | grep prefix )
HTTPPREFIX?=$(shell echo $(HTTPPREFIXBASE) | cut -f 2 -d '=')
ifeq ($(HTTPPREFIXBASE),)
- HTTPPREFIX=asterisk
-endif
-HTTPURL=http://$(HTTPHOST):$(HTTPBINDPORT)/$(HTTPPREFIX)/static/config/cfgbasic.html
-HTTPSETUPURL=http://$(HTTPHOST):$(HTTPBINDPORT)/$(HTTPPREFIX)/static/config/setup.html
-
-SUBDIRS=tools
-# Nothing to do yet for building, but one day there could be...
+ HTTPPREFIX:=asterisk
+endif
+HTTPURL:=http://$(HTTPHOST):$(HTTPBINDPORT)/$(HTTPPREFIX)/static/config/cfgbasic.html
+HTTPSETUPURL:=http://$(HTTPHOST):$(HTTPBINDPORT)/$(HTTPPREFIX)/static/config/setup.html
+
+SUBDIRS:=tools
+SUBDIRS_CLEAN:=$(SUBDIRS:%=%-clean)
+SUBDIRS_INSTALL:=$(SUBDIRS:%=%-install)
all: _all
@echo " +------- Asterisk-GUI Build Complete -------+"
@echo " + Asterisk-GUI has successfully been built, +"
@echo " + and can be installed by running: +"
@echo " + +"
- @echo " + make install +"
+ @echo " + $(MAKE) install +"
@echo " +-------------------------------------------+"
-_all:
- for x in $(SUBDIRS); do \
+_all: makeopts
+ @for x in $(SUBDIRS); do \
$(MAKE) -C $$x all ; \
done
@@ -146,37 +186,41 @@
@echo ""
@echo " --- Good luck! --- "
-_install: _all
+$(SUBDIRS_INSTALL):
+ @ASTSBINDIR="$(ASTSBINDIR)" $(MAKE) -C $(@:-install=) install
+
+_install: _all $(SUBDIRS_INSTALL)
@echo "Installing into $(HTTPDIR)"
- for x in $(SUBDIRS); do \
- $(MAKE) -C $$x install ; \
- done
mkdir -p $(CONFIGDIR)
mkdir -p $(CONFIGDIR)/images
mkdir -p $(CONFIGDIR)/scripts
mkdir -p $(CONFIGDIR)/stylesheets
mkdir -p $(CONFIGDIR)/bkps
- for x in gui_configs/*; do \
+ @for x in gui_configs/*; do \
+ echo "$$x --> $(ASTETCDIR)" ; \
cp $$x $(ASTETCDIR)/ ; \
done
- for x in config/images/*; do \
+ @for x in config/images/*; do \
+ echo "$$x --> $(CONFIGDIR)/images/" ; \
$(INSTALL) -m 644 $$x $(CONFIGDIR)/images/ ; \
done
- for x in config/scripts/*; do \
+ @for x in config/scripts/*; do \
+ echo "$$x --> $(CONFIGDIR)/scripts/" ; \
$(INSTALL) -m 644 $$x $(CONFIGDIR)/scripts/ ; \
done
- for x in config/stylesheets/*; do \
+ @for x in config/stylesheets/*; do \
+ echo "$$x --> $(CONFIGDIR)/stylesheets/" ; \
$(INSTALL) -m 644 $$x $(CONFIGDIR)/stylesheets/ ; \
done
- for x in config/*.html; do \
+ @for x in config/*.html; do \
+ echo "$$x --> $(CONFIGDIR)" ; \
$(INSTALL) -m 644 $$x $(CONFIGDIR)/ ; \
done
@if [ -x /usr/sbin/asterisk-gui-post-install ]; then \
/usr/sbin/asterisk-gui-post-install $(DESTDIR) . ; \
fi
-install:_install
-
+install: _install
@echo " +---- Asterisk GUI Installation Complete ---+"
@echo " + +"
@echo " + YOU MUST READ THE SECURITY DOCUMENT +"
@@ -203,10 +247,13 @@
@echo " + +"
@echo " +-------------------------------------------+"
-clean:
- for x in $(SUBDIRS); do \
- $(MAKE) -C $$x clean ; \
- done
+$(SUBDIRS_CLEAN):
+ @$(MAKE) -C $(@:-clean=) clean
+
+clean: $(SUBDIRS_CLEAN)
+
+distclean: clean
+ rm -f makeopts autom4te.cache
samples:
mkdir -p $(DESTDIR)$(ASTETCDIR)
@@ -225,3 +272,11 @@
fi ; \
$(INSTALL) -m 644 $$x $(DESTDIR)$(ASTETCDIR)/`$(BASENAME) $$x .sample` ;\
done
+
+makeopts: configure
+ @echo "****"
+ @echo "**** The configure script must be executed before running '$(MAKE)'."
+ @echo "****"
+ @exit 1
+
+.PHONY: samples clean all install _all _install checkconfig distclean $(SUBDIRS_CLEAN) $(SUBDIRS_INSTALL)
Added: trunk/acinclude.m4
URL: http://svn.digium.com/view/asterisk-gui/trunk/acinclude.m4?view=auto&rev=151
==============================================================================
--- trunk/acinclude.m4 (added)
+++ trunk/acinclude.m4 Thu Dec 7 05:50:25 2006
@@ -1,0 +1,706 @@
+# AST_GCC_ATTRIBUTE([attribute name])
+
+AC_DEFUN([AST_GCC_ATTRIBUTE],
+[
+AC_MSG_CHECKING(for compiler 'attribute $1' support)
+AC_COMPILE_IFELSE(
+ AC_LANG_PROGRAM([static int __attribute__(($1)) test(void) {}],
+ []),
+ AC_MSG_RESULT(yes)
+ AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]),
+ AC_MSG_RESULT(no))
+])
+
+# AST_EXT_LIB_SETUP([package symbol name], [package friendly name], [package option name], [additional help text])
+
+AC_DEFUN([AST_EXT_LIB_SETUP],
+[
+$1_DESCRIP="$2"
+$1_OPTION="$3"
+AC_ARG_WITH([$3], AC_HELP_STRING([--with-$3=PATH],[use $2 files in PATH $4]),[
+case ${withval} in
+ n|no)
+ USE_$1=no
+ ;;
+ y|ye|yes)
+ ac_mandatory_list="${ac_mandatory_list} $1"
+ ;;
+ *)
+ $1_DIR="${withval}"
+ ac_mandatory_list="${ac_mandatory_list} $1"
+ ;;
+esac
+])
+PBX_$1=0
+AC_SUBST([$1_LIB])
+AC_SUBST([$1_INCLUDE])
+AC_SUBST([PBX_$1])
+])
+
+# Check whether any of the mandatory modules are not present, and
+# print error messages in case.
+
+AC_DEFUN([AST_CHECK_MANDATORY],
+[
+ AC_MSG_CHECKING([for mandatory modules: ${ac_mandatory_list}])
+ err=0;
+ for i in ${ac_mandatory_list}; do
+ eval "a=\${PBX_$i}"
+ if test "x${a}" = "x1" ; then continue; fi
+ if test ${err} = "0" ; then AC_MSG_RESULT(fail) ; fi
+ AC_MSG_RESULT()
+ eval "a=\${${i}_OPTION}"
+ AC_MSG_NOTICE(***)
+ AC_MSG_NOTICE(*** The $i installation appears to be missing or broken.)
+ AC_MSG_NOTICE(*** Either correct the installation, or run configure)
+ AC_MSG_NOTICE(*** including --without-${a}.)
+ err=1
+ done
+ if test $err = 1 ; then exit 1; fi
+ AC_MSG_RESULT(ok)
+])
+
+#-- The following two tests are only performed if PBX_$1 != 1,
+# so you can use multiple tests and stop at the first matching one.
+# On success, set PBX_$1 = 1, and also #define HAVE_$1 1
+# and #define HAVE_$1_VERSION ${last_argument} so you can tell which
+# test succeeded.
+# They should be called after AST_EXT_LIB_SETUP($1, ...)
+
+# Check if a given macro is defined in a certain header.
+
+# AST_C_DEFINE_CHECK([package symbol name], [macro name], [header file], [version])
+AC_DEFUN([AST_C_DEFINE_CHECK],
+[
+ if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
+ AC_MSG_CHECKING([for $2 in $3])
+ saved_cppflags="${CPPFLAGS}"
+ if test "x${$1_DIR}" != "x"; then
+ $1_INCLUDE= "-I${$1_DIR}/include"
+ fi
+ CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"
+
+ AC_COMPILE_IFELSE(
+ [ AC_LANG_PROGRAM( [#include <$3>], [int foo = $2;]) ],
+ [ AC_MSG_RESULT(yes)
+ PBX_$1=1
+ AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 headers.])
+ AC_DEFINE([HAVE_$1_VERSION], $4, [Define $1 headers version])
+ ],
+ [ AC_MSG_RESULT(no) ]
+ )
+ CPPFLAGS="${saved_cppflags}"
+ fi
+])
+
+
+# Check for existence of a given package ($1), either looking up a function
+# in a library, or, if no function is supplied, only check for the
+# existence of the header files.
+
+# AST_EXT_LIB_CHECK([package symbol name], [package library name], [function to check], [package header], [additional LIB data], [version])
+AC_DEFUN([AST_EXT_LIB_CHECK],
+[
+if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
+ pbxlibdir=""
+ if test "x${$1_DIR}" != "x"; then
+ if test -d ${$1_DIR}/lib; then
+ pbxlibdir="-L${$1_DIR}/lib"
+ else
+ pbxlibdir="-L${$1_DIR}"
+ fi
+ fi
+ pbxfuncname="$3"
+ if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
+ AST_$1_FOUND=yes
+ else
+ AC_CHECK_LIB([$2], [${pbxfuncname}], [AST_$1_FOUND=yes], [AST_$1_FOUND=no], ${pbxlibdir} $5)
+ fi
+
+ if test "${AST_$1_FOUND}" = "yes"; then
+ $1_LIB="-l$2 $5"
+ $1_HEADER_FOUND="1"
+ if test "x${$1_DIR}" != "x"; then
+ $1_LIB="${pbxlibdir} ${$1_LIB}"
+ $1_INCLUDE="-I${$1_DIR}/include"
+ if test "x$4" != "x" ; then
+ AC_CHECK_HEADER([${$1_DIR}/include/$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0] )
+ fi
+ else
+ if test "x$4" != "x" ; then
+ AC_CHECK_HEADER([$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0] )
+ fi
+ fi
+ if test "x${$1_HEADER_FOUND}" = "x0" ; then
+ $1_LIB=""
+ $1_INCLUDE=""
+ else
+ if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
+ $1_LIB=""
+ fi
+ PBX_$1=1
+ # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
+ AC_DEFINE_UNQUOTED([HAVE_$1], 1, [Define this to indicate the ${$1_DESCRIP} library])
+ AC_DEFINE_UNQUOTED([HAVE_$1_VERSION], [$6], [Define to indicate the ${$1_DESCRIP} library version])
+ fi
+ fi
+fi
+])
+
+
+AC_DEFUN(
+[AST_CHECK_GNU_MAKE], [AC_CACHE_CHECK(for GNU make, GNU_MAKE,
+ GNU_MAKE='Not Found' ;
+ GNU_MAKE_VERSION_MAJOR=0 ;
+ GNU_MAKE_VERSION_MINOR=0 ;
+ for a in make gmake gnumake ; do
+ if test -z "$a" ; then continue ; fi ;
+ if ( sh -c "$a --version" 2> /dev/null | grep GNU 2>&1 > /dev/null ) ; then
+ GNU_MAKE=$a ;
+ GNU_MAKE_VERSION_MAJOR=`$GNU_MAKE --version | grep "GNU Make" | cut -f3 -d' ' | cut -f1 -d'.'`
+ GNU_MAKE_VERSION_MINOR=`$GNU_MAKE --version | grep "GNU Make" | cut -f2 -d'.' | cut -c1-2`
+ break;
+ fi
+ done ;
+) ;
+if test "x$GNU_MAKE" = "xNot Found" ; then
+ AC_MSG_ERROR( *** Please install GNU make. It is required to build Asterisk!)
+ exit 1
+fi
+AC_SUBST([GNU_MAKE])
+])
+
+
+AC_DEFUN(
+[AST_CHECK_PWLIB], [
+PWLIB_INCDIR=
+PWLIB_LIBDIR=
+if test "${PWLIBDIR:-unset}" != "unset" ; then
+ AC_CHECK_FILE(${PWLIBDIR}/version.h, HAS_PWLIB=1, )
+fi
+if test "${HAS_PWLIB:-unset}" = "unset" ; then
+ if test "${OPENH323DIR:-unset}" != "unset"; then
+ AC_CHECK_FILE(${OPENH323DIR}/../pwlib/version.h, HAS_PWLIB=1, )
+ fi
+ if test "${HAS_PWLIB:-unset}" != "unset" ; then
+ PWLIBDIR="${OPENH323DIR}/../pwlib"
+ else
+ AC_CHECK_FILE(${HOME}/pwlib/include/ptlib.h, HAS_PWLIB=1, )
+ if test "${HAS_PWLIB:-unset}" != "unset" ; then
+ PWLIBDIR="${HOME}/pwlib"
+ else
+ AC_CHECK_FILE(/usr/local/include/ptlib.h, HAS_PWLIB=1, )
+ if test "${HAS_PWLIB:-unset}" != "unset" ; then
+ AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/bin)
+ if test "${PTLIB_CONFIG:-unset}" = "unset" ; then
+ AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/share/pwlib/make)
+ fi
+ PWLIB_INCDIR="/usr/local/include"
+ if test "x$LIB64" != "x"; then
+ PWLIB_LIBDIR="/usr/local/lib64"
+ else
+ PWLIB_LIBDIR="/usr/local/lib"
+ fi
+ else
+ AC_CHECK_FILE(/usr/include/ptlib.h, HAS_PWLIB=1, )
+ if test "${HAS_PWLIB:-unset}" != "unset" ; then
+ AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/share/pwlib/make)
+ PWLIB_INCDIR="/usr/include"
+ if test "x$LIB64" != "x"; then
+ PWLIB_LIBDIR="/usr/lib64"
+ else
+ PWLIB_LIBDIR="/usr/lib"
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+#if test "${HAS_PWLIB:-unset}" = "unset" ; then
+# echo "Cannot find pwlib - please install or set PWLIBDIR and try again"
+# exit
+#fi
+
+if test "${HAS_PWLIB:-unset}" != "unset" ; then
+ if test "${PWLIBDIR:-unset}" = "unset" ; then
+ if test "${PTLIB_CONFIG:-unset}" != "unset" ; then
+ PWLIBDIR=`$PTLIB_CONFIG --prefix`
+ else
+ echo "Cannot find ptlib-config - please install and try again"
+ exit
+ fi
+ fi
+
+ if test "x$PWLIBDIR" = "x/usr" -o "x$PWLIBDIR" = "x/usr/"; then
+ PWLIBDIR="/usr/share/pwlib"
+ PWLIB_INCDIR="/usr/include"
+ if test "x$LIB64" != "x"; then
+ PWLIB_LIBDIR="/usr/lib64"
+ else
+ PWLIB_LIBDIR="/usr/lib"
+ fi
+ fi
+ if test "x$PWLIBDIR" = "x/usr/local" -o "x$PWLIBDIR" = "x/usr/"; then
+ PWLIBDIR="/usr/local/share/pwlib"
+ PWLIB_INCDIR="/usr/local/include"
+ if test "x$LIB64" != "x"; then
+ PWLIB_LIBDIR="/usr/local/lib64"
+ else
+ PWLIB_LIBDIR="/usr/local/lib"
+ fi
+ fi
+
+ if test "${PWLIB_INCDIR:-unset}" = "unset"; then
+ PWLIB_INCDIR="${PWLIBDIR}/include"
+ fi
+ if test "${PWLIB_LIBDIR:-unset}" = "unset"; then
+ PWLIB_LIBDIR="${PWLIBDIR}/lib"
+ fi
+
+ AC_SUBST([PWLIBDIR])
+ AC_SUBST([PWLIB_INCDIR])
+ AC_SUBST([PWLIB_LIBDIR])
+fi
+])
+
+
+AC_DEFUN(
+[AST_CHECK_OPENH323_PLATFORM], [
+PWLIB_OSTYPE=
+case "$host_os" in
+ linux*) PWLIB_OSTYPE=linux ;
+ ;;
+ freebsd* ) PWLIB_OSTYPE=FreeBSD ;
+ ;;
+ openbsd* ) PWLIB_OSTYPE=OpenBSD ;
+ ENDLDLIBS="-lossaudio" ;
+ ;;
+ netbsd* ) PWLIB_OSTYPE=NetBSD ;
+ ENDLDLIBS="-lossaudio" ;
+ ;;
+ solaris* | sunos* ) PWLIB_OSTYPE=solaris ;
+ ;;
+ darwin* ) PWLIB_OSTYPE=Darwin ;
+ ;;
+ beos*) PWLIB_OSTYPE=beos ;
+ STDCCFLAGS="$STDCCFLAGS -D__BEOS__"
+ ;;
+ cygwin*) PWLIB_OSTYPE=cygwin ;
+ ;;
+ mingw*) PWLIB_OSTYPE=mingw ;
+ STDCCFLAGS="$STDCCFLAGS -mms-bitfields" ;
+ ENDLDLIBS="-lwinmm -lwsock32 -lsnmpapi -lmpr -lcomdlg32 -lgdi32 -lavicap32" ;
+ ;;
+ * ) PWLIB_OSTYPE="$host_os" ;
+ AC_MSG_WARN("OS $PWLIB_OSTYPE not recognized - proceed with caution!") ;
+ ;;
+esac
+
+PWLIB_MACHTYPE=
+case "$host_cpu" in
+ x86 | i686 | i586 | i486 | i386 ) PWLIB_MACHTYPE=x86
+ ;;
+
+ x86_64) PWLIB_MACHTYPE=x86_64 ;
+ P_64BIT=1 ;
+ LIB64=1 ;
+ ;;
+
+ alpha | alphaev56 | alphaev6 | alphaev67 | alphaev7) PWLIB_MACHTYPE=alpha ;
+ P_64BIT=1 ;
+ ;;
+
+ sparc ) PWLIB_MACHTYPE=sparc ;
+ ;;
+
+ powerpc ) PWLIB_MACHTYPE=ppc ;
+ ;;
+
+ ppc ) PWLIB_MACHTYPE=ppc ;
+ ;;
+
+ powerpc64 ) PWLIB_MACHTYPE=ppc64 ;
+ P_64BIT=1 ;
+ LIB64=1 ;
+ ;;
+
+ ppc64 ) PWLIB_MACHTYPE=ppc64 ;
+ P_64BIT=1 ;
+ LIB64=1 ;
+ ;;
+
+ ia64) PWLIB_MACHTYPE=ia64 ;
+ P_64BIT=1 ;
+ ;;
+
+ s390x) PWLIB_MACHTYPE=s390x ;
+ P_64BIT=1 ;
+ LIB64=1 ;
+ ;;
+
+ s390) PWLIB_MACHTYPE=s390 ;
+ ;;
+
+ * ) PWLIB_MACHTYPE="$host_cpu";
+ AC_MSG_WARN("CPU $PWLIB_MACHTYPE not recognized - proceed with caution!") ;;
+esac
+
+PWLIB_PLATFORM="${PWLIB_OSTYPE}_${PWLIB_MACHTYPE}"
+
+AC_SUBST([PWLIB_PLATFORM])
+])
+
+
+AC_DEFUN(
+[AST_CHECK_OPENH323], [
+OPENH323_INCDIR=
+OPENH323_LIBDIR=
+if test "${OPENH323DIR:-unset}" != "unset" ; then
+ AC_CHECK_FILE(${OPENH323DIR}/version.h, HAS_OPENH323=1, )
+fi
+if test "${HAS_OPENH323:-unset}" = "unset" ; then
+ AC_CHECK_FILE(${PWLIBDIR}/../openh323/version.h, OPENH323DIR="${PWLIBDIR}/../openh323"; HAS_OPENH323=1, )
+ if test "${HAS_OPENH323:-unset}" != "unset" ; then
+ OPENH323DIR="${PWLIBDIR}/../openh323"
+ AC_CHECK_FILE(${OPENH323DIR}/include/h323.h, , OPENH323_INCDIR="${PWLIB_INCDIR}/openh323"; OPENH323_LIBDIR="${PWLIB_LIBDIR}")
+ else
+ AC_CHECK_FILE(${HOME}/openh323/include/h323.h, HAS_OPENH323=1, )
+ if test "${HAS_OPENH323:-unset}" != "unset" ; then
+ OPENH323DIR="${HOME}/openh323"
+ else
+ AC_CHECK_FILE(/usr/local/include/openh323/h323.h, HAS_OPENH323=1, )
+ if test "${HAS_OPENH323:-unset}" != "unset" ; then
+ OPENH323DIR="/usr/local/share/openh323"
+ OPENH323_INCDIR="/usr/local/include/openh323"
+ if test "x$LIB64" != "x"; then
+ OPENH323_LIBDIR="/usr/local/lib64"
+ else
+ OPENH323_LIBDIR="/usr/local/lib"
+ fi
+ else
+ AC_CHECK_FILE(/usr/include/openh323/h323.h, HAS_OPENH323=1, )
+ if test "${HAS_OPENH323:-unset}" != "unset" ; then
+ OPENH323DIR="/usr/share/openh323"
+ OPENH323_INCDIR="/usr/include/openh323"
+ if test "x$LIB64" != "x"; then
+ OPENH323_LIBDIR="/usr/lib64"
+ else
+ OPENH323_LIBDIR="/usr/lib"
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+if test "${HAS_OPENH323:-unset}" != "unset" ; then
+ if test "${OPENH323_INCDIR:-unset}" = "unset"; then
+ OPENH323_INCDIR="${OPENH323DIR}/include"
+ fi
+ if test "${OPENH323_LIBDIR:-unset}" = "unset"; then
+ OPENH323_LIBDIR="${OPENH323DIR}/lib"
+ fi
+
+ AC_SUBST([OPENH323DIR])
+ AC_SUBST([OPENH323_INCDIR])
+ AC_SUBST([OPENH323_LIBDIR])
+fi
+])
+
+
+AC_DEFUN(
+[AST_CHECK_PWLIB_VERSION], [
+ if test "${HAS_$2:-unset}" != "unset"; then
+ $2_VERSION=`grep "$2_VERSION" ${$2_INCDIR}/$3 | cut -f2 -d ' ' | sed -e 's/"//g'`
+ $2_MAJOR_VERSION=`echo ${$2_VERSION} | cut -f1 -d.`
+ $2_MINOR_VERSION=`echo ${$2_VERSION} | cut -f2 -d.`
+ $2_BUILD_NUMBER=`echo ${$2_VERSION} | cut -f3 -d.`
+ let $2_VER=${$2_MAJOR_VERSION}*10000+${$2_MINOR_VERSION}*100+${$2_BUILD_NUMBER}
+ let $2_REQ=$4*10000+$5*100+$6
+
+ AC_MSG_CHECKING(if $1 version ${$2_VERSION} is compatible with chan_h323)
+ if test ${$2_VER} -lt ${$2_REQ}; then
+ AC_MSG_RESULT(no)
+ unset HAS_$2
+ else
+ AC_MSG_RESULT(yes)
+ fi
+ fi
+])
+
+
+AC_DEFUN(
+[AST_CHECK_PWLIB_BUILD], [
+ if test "${HAS_$2:-unset}" != "unset"; then
+ AC_MSG_CHECKING($1 installation validity)
+
+ saved_cppflags="${CPPFLAGS}"
+ saved_libs="${LIBS}"
+ LIBS="${LIBS} -L${$2_LIBDIR} -l${PLATFORM_$2} $7"
+ CPPFLAGS="${CPPFLAGS} -I${$2_INCDIR} $6"
+
+ AC_LANG_PUSH([C++])
+
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([$4],[$5])],
+ [ AC_MSG_RESULT(yes)
+ ac_cv_lib_$2="yes"
+ ],
+ [ AC_MSG_RESULT(no)
+ ac_cv_lib_$2="no"
+ ]
+ )
+
+ AC_LANG_POP([C++])
+
+ LIBS="${saved_libs}"
+ CPPFLAGS="${saved_cppflags}"
+
+ if test "${ac_cv_lib_$2}" = "yes"; then
+ if test "${$2_LIBDIR}" != "" -a "${$2_LIBDIR}" != "/usr/lib"; then
+ $2_LIB="-L${$2_LIBDIR} -l${PLATFORM_$2}"
+ else
+ $2_LIB="-l${PLATFORM_$2}"
+ fi
+ if test "${$2_INCDIR}" != "" -a "${$2_INCDIR}" != "/usr/include"; then
+ $2_INCLUDE="-I${$2_INCDIR}"
+ fi
+ PBX_$2=1
+ AC_DEFINE([HAVE_$2], 1, [$3])
+ 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
+])
+
+
+# AST_FUNC_FORK
+# -------------
+AN_FUNCTION([fork], [AST_FUNC_FORK])
+AN_FUNCTION([vfork], [AST_FUNC_FORK])
+AC_DEFUN([AST_FUNC_FORK],
+[AC_REQUIRE([AC_TYPE_PID_T])dnl
+AC_CHECK_HEADERS(vfork.h)
+AC_CHECK_FUNCS(fork vfork)
+if test "x$ac_cv_func_fork" = xyes; then
+ _AST_FUNC_FORK
+else
+ ac_cv_func_fork_works=$ac_cv_func_fork
+fi
+if test "x$ac_cv_func_fork_works" = xcross; then
+ case $host in
+ *-*-amigaos* | *-*-msdosdjgpp* | *-*-uclinux* )
+ # Override, as these systems have only a dummy fork() stub
+ ac_cv_func_fork_works=no
+ ;;
+ *)
+ ac_cv_func_fork_works=yes
+ ;;
+ esac
+ AC_MSG_WARN([result $ac_cv_func_fork_works guessed because of cross compilation])
+fi
+ac_cv_func_vfork_works=$ac_cv_func_vfork
+if test "x$ac_cv_func_vfork" = xyes; then
+ _AC_FUNC_VFORK
+fi;
+if test "x$ac_cv_func_fork_works" = xcross; then
+ ac_cv_func_vfork_works=$ac_cv_func_vfork
+ AC_MSG_WARN([result $ac_cv_func_vfork_works guessed because of cross compilation])
+fi
+
+if test "x$ac_cv_func_vfork_works" = xyes; then
+ AC_DEFINE(HAVE_WORKING_VFORK, 1, [Define to 1 if `vfork' works.])
+else
+ AC_DEFINE(vfork, fork, [Define as `fork' if `vfork' does not work.])
+fi
+if test "x$ac_cv_func_fork_works" = xyes; then
+ AC_DEFINE(HAVE_WORKING_FORK, 1, [Define to 1 if `fork' works.])
+fi
+])# AST_FUNC_FORK
+
+
+# _AST_FUNC_FORK
+# -------------
+AC_DEFUN([_AST_FUNC_FORK],
+ [AC_CACHE_CHECK(for working fork, ac_cv_func_fork_works,
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+ [
+ /* By Ruediger Kuhlmann. */
+ return fork () < 0;
+ ])],
+ [ac_cv_func_fork_works=yes],
+ [ac_cv_func_fork_works=no],
+ [ac_cv_func_fork_works=cross])])]
+)# _AST_FUNC_FORK
+
+# AST_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AST_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+ [AC_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])
+AC_REQUIRE([AST_PROG_SED])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AST_PROG_LD_GNU
+])# AST_PROG_LD
+
+
+# AST_PROG_LD_GNU
+# --------------
+AC_DEFUN([AST_PROG_LD_GNU],
+[AC_REQUIRE([AST_PROG_EGREP])dnl
+AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# AST_PROG_LD_GNU
+
+# AST_PROG_EGREP
+# -------------
+m4_ifndef([AST_PROG_EGREP], [AC_DEFUN([AST_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+ [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])]) # AST_PROG_EGREP
+
+# AST_PROG_SED
+# -----------
+# Check for a fully functional sed program that truncates
+# as few characters as possible. Prefer GNU sed if found.
+AC_DEFUN([AST_PROG_SED],
+[AC_CACHE_CHECK([for a sed that does not truncate output], ac_cv_path_SED,
+ [dnl ac_script should not contain more than 99 commands (for HP-UX sed),
+ dnl but more than about 7000 bytes, to catch a limit in Solaris 8 /usr/ucb/sed.
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" | sed 99q >conftest.sed
+ $as_unset ac_script || ac_script=
+ _AC_PATH_PROG_FEATURE_CHECK(SED, [sed gsed],
+ [_AC_FEATURE_CHECK_LENGTH([ac_path_SED], [ac_cv_path_SED],
+ ["$ac_path_SED" -f conftest.sed])])])
+ SED="$ac_cv_path_SED"
+ AC_SUBST([SED])dnl
+ rm -f conftest.sed
+])# AST_PROG_SED
+
Added: trunk/bootstrap.sh
URL: http://svn.digium.com/view/asterisk-gui/trunk/bootstrap.sh?view=auto&rev=151
==============================================================================
--- trunk/bootstrap.sh (added)
+++ trunk/bootstrap.sh Thu Dec 7 05:50:25 2006
@@ -1,0 +1,40 @@
+#!/bin/sh
+
+check_for_app() {
+ $1 --version 2>&1 >/dev/null
+ if [ $? != 0 ]
+ then
+ echo "Please install $1 and run bootstrap.sh again!"
+ exit 1
+ fi
+}
+
+# On FreeBSD, multiple autoconf/automake versions have different names.
+# On linux, envitonment variables tell which one to use.
+
+uname -s | grep -q FreeBSD
+if [ $? = 0 ] ; then # FreeBSD case
+ MY_AC_VER=259
+ MY_AM_VER=19
+else # linux case
+ MY_AC_VER=
+ MY_AM_VER=
+ AUTOCONF_VERSION=2.60
+ AUTOMAKE_VERSION=1.9
+ export AUTOCONF_VERSION
+ export AUTOMAKE_VERSION
+fi
+
+check_for_app autoconf${MY_AC_VER}
+# check_for_app autoheader${MY_AC_VER}
+check_for_app automake${MY_AM_VER}
+check_for_app aclocal${MY_AM_VER}
+
+echo "Generating the configure script ..."
+
+aclocal${MY_AM_VER} 2>/dev/null
+autoconf${MY_AC_VER}
+# autoheader${MY_AC_VER}
+automake${MY_AM_VER} --add-missing --copy 2>/dev/null
+
+exit 0
Propchange: trunk/bootstrap.sh
------------------------------------------------------------------------------
svn:executable = *
Added: trunk/build_tools/make_version
URL: http://svn.digium.com/view/asterisk-gui/trunk/build_tools/make_version?view=auto&rev=151
==============================================================================
--- trunk/build_tools/make_version (added)
+++ trunk/build_tools/make_version Thu Dec 7 05:50:25 2006
@@ -1,0 +1,56 @@
+#!/bin/sh
+
+if [ -f ${1}/.version ]; then
+ cat ${1}/.version
+elif [ -f ${1}/.svnrevision ]; then
+ echo SVN-`cat ${1}/.svnbranch`-r`cat ${1}/.svnrevision`
+elif [ -d .svn ]; then
+ PARTS=`LANG=C svn info ${1} | grep URL | awk '{print $2;}' | sed -e 's:^.*/svn/asterisk-gui/::' | sed -e 's:/: :g'`
+ BRANCH=0
+ TEAM=0
+
+ REV=`svnversion -c ${1} | cut -d: -f2`
+
+ if [ "${PARTS}" = "trunk" ]
+ then
+ echo SVN-'trunk'-r${REV}
+ exit 0
+ fi
+
+ for PART in $PARTS
+ do
+ if [ ${BRANCH} != 0 ]
+ then
+ RESULT="${RESULT}-${PART}"
+ break
+ fi
+
+ if [ ${TEAM} != 0 ]
+ then
+ RESULT="${RESULT}-${PART}"
+ continue
+ fi
+
+ if [ "${PART}" = "branches" ]
+ then
+ BRANCH=1
+ RESULT="branch"
+ continue
+ fi
+
+ if [ "${PART}" = "tags" ]
+ then
+ BRANCH=1
+ RESULT="tag"
+ continue
+ fi
+
+ if [ "${PART}" = "team" ]
+ then
+ TEAM=1
+ continue
+ fi
+ done
+
+ echo SVN-${RESULT##-}-r${REV}
+fi
Propchange: trunk/build_tools/make_version
------------------------------------------------------------------------------
svn:executable = *
Added: trunk/config.guess
URL: http://svn.digium.com/view/asterisk-gui/trunk/config.guess?view=auto&rev=151
==============================================================================
--- trunk/config.guess (added)
+++ trunk/config.guess Thu Dec 7 05:50:25 2006
@@ -1,0 +1,1495 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2006-03-13'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per at bothner.com>.
+# Please send patches to <config-patches at gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
[... 9091 lines stripped ...]
More information about the asterisk-gui-commits
mailing list