~ubuntu-branches/ubuntu/quantal/zaptel/quantal

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Bazaar Package Importer
  • Author(s): Tzafrir Cohen
  • Date: 2008-08-28 22:58:23 UTC
  • mfrom: (11.1.11 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080828225823-r8bdunirm8hmc76m
Tags: 1:1.4.11~dfsg-2
* Patch xpp_fxs_power: Fixed an issue with hook detection of the Astribank
  FXS module.
* Don't fail init.d script if fxotune fails. This may happen if running it
  when Asterisk is already running.
* Bump standards version to 3.8.0.0 .
* Ignore false lintian warning ("m-a a-i" has "a a").
* Patch xpp_fxo_cid_always: do always pass PCM if that's what the user
  asked.
* Patch vzaphfc_proc_root_dir: fix vzaphfc on 2.6.26.
* Patch wcte12xp_flags: Proper time for irq save flags.
* Patch headers_2627: Fix location of semaphore.h for 2.6.27 .
* Patch xpp_fxs_dtmf_leak: Don't play DTMFs to the wrong channel.
* Patch wctdm_fix_alarm: Fix sending channel alarms.
* Patch device_class_2626: Fix building 2.6.26 (Closes: #493397).
* Using dh_lintian for lintian overrides, hence requiring debhelper 6.0.7.
* Lintian: we know we have direct changes. Too bad we're half-upstream :-(
* Fix doc-base section names. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Process this file with autoconf to produce a configure script.
 
2
 
 
3
AC_PREREQ(2.59)
 
4
 
 
5
m4_define([ZAP_VERSION],
 
6
          m4_bpatsubst(m4_esyscmd([build_tools/make_version .]),
 
7
                       [\([0-9.]*\)\(\w\|\W\)*],
 
8
                       [\1]))
 
9
AC_INIT(zaptel, ZAP_VERSION, www.asterisk.org)
 
10
 
 
11
# check existence of the package
 
12
AC_CONFIG_SRCDIR([kernel/zaptel-base.c])
 
13
 
 
14
AC_COPYRIGHT("Zaptel")
 
15
AC_REVISION($Revision: 3793 $)
 
16
 
 
17
ac_default_prefix=/usr
 
18
if test ${sysconfdir} = '${prefix}/etc'; then
 
19
   sysconfdir=/etc
 
20
fi
 
21
if test ${mandir} = '${prefix}/man'; then
 
22
   mandir=/usr/share/man
 
23
fi
 
24
 
 
25
if test ${localstatedir} = '${prefix}/var'; then
 
26
     localstatedir=/var
 
27
fi
 
28
 
 
29
# This needs to be before any macros that use the C compiler
 
30
AC_GNU_SOURCE
 
31
 
 
32
# Checks for programs.
 
33
AC_PROG_CC
 
34
AC_PROG_CPP
 
35
AC_PROG_INSTALL
 
36
AC_PROG_LN_S
 
37
AST_CHECK_GNU_MAKE
 
38
 
 
39
test_obj=conftest.o
 
40
AC_COMPILE_IFELSE(AC_LANG_SOURCE(),[
 
41
        BDFNAME=`LANG=C objdump -f $test_obj | grep -e "$test_obj:" | sed "s/.*file format \(.*\)/\1/"`
 
42
        BDFARCH=`LANG=C objdump -f $test_obj | grep -e "architecture:" | sed "s/.*ture: \(.*\),.*/\1/"`    
 
43
],[])
 
44
AC_SUBST(BDFNAME)
 
45
AC_SUBST(BDFARCH)
 
46
 
 
47
# Set the default value of HOSTCC from CC if --host was not provided:
 
48
HOSTCC=${HOSTCC:=${CC}}
 
49
AC_SUBST(HOSTCC)
 
50
 
 
51
AC_PATH_PROG([GREP], [grep], :)
 
52
AC_PATH_PROG([SHELL], [sh], :)
 
53
AC_PATH_PROG([LN], [ln], :)
 
54
 
 
55
AC_PATH_PROG([WGET], [wget], :)
 
56
if test "${WGET}" != ":" ; then
 
57
  DOWNLOAD=${WGET}
 
58
else
 
59
  AC_PATH_PROG([FETCH], [fetch], [:])
 
60
  DOWNLOAD=${FETCH}
 
61
fi
 
62
AC_SUBST(DOWNLOAD)
 
63
 
 
64
AC_LANG(C)
 
65
 
 
66
AST_EXT_LIB([curses], [initscr], [curses.h], [CURSES], [curses], [])
 
67
AST_EXT_LIB([ncurses], [initscr], [curses.h], [NCURSES], [ncurses], [])
 
68
AST_EXT_LIB([newt], [newtBell], [newt.h], [NEWT], [newt])
 
69
AST_EXT_LIB([usb], [usb_init], [usb.h], [USB], [libusb])
 
70
 
 
71
AC_ARG_WITH(selinux,
 
72
        [AS_HELP_STRING([--with-selinux],
 
73
                        [enable (with) / disable (without) SELinux])],
 
74
        [USE_SELINUX=$withval],
 
75
        [ if test ! -x /usr/sbin/sestatus; then 
 
76
                USE_SELINUX=no;
 
77
          elif /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"; then
 
78
                USE_SELINUX=yes
 
79
          fi
 
80
        ]
 
81
)
 
82
 
 
83
 
 
84
AC_SUBST(USE_SELINUX)
 
85
 
 
86
# for asciidoc before ver. 7, the backend must be stated explicitly:
 
87
ASCIIDOC='asciidoc'
 
88
asciidoc_ver=`asciidoc --version 2>&1 | awk '/^asciidoc /{print $2}' | cut -d. -f 1 | head -n 1`
 
89
if test "$asciidoc_ver" != '' && test $asciidoc_ver -lt 7; then
 
90
        ASCIIDOC="asciidoc -b xhtml"
 
91
fi
 
92
AC_SUBST(ASCIIDOC)
 
93
 
 
94
AC_ARG_WITH(ppp,
 
95
            [AS_HELP_STRING([--with-ppp=PATH],[Use ppp support from PATH])],
 
96
            [],
 
97
            [with_ppp=check]
 
98
            )
 
99
# somebody will fix that
 
100
default_ppp_path=/usr
 
101
 
 
102
case "$with_ppp" in
 
103
        yes|check) ppp_path="$default_ppp_path";;
 
104
        no) ppp_path='' ;;
 
105
        *) ppp_path="$with_ppp" ;;
 
106
esac
 
107
 
 
108
level_file="$ppp_path/include/pppd/patchlevel.h"
 
109
PPP_VERSION=
 
110
if test "$ppp_path" != '' && test -r "$level_file"; then
 
111
        PPPD_VERSION=`awk -F '"' '/VERSION/ { print $$2; }' $level_file`
 
112
fi
 
113
 
 
114
case "$with_ppp" in 
 
115
        check|no) :;;
 
116
        *) 
 
117
        # If we asked explicitly for ppp support
 
118
        if test "$PPPD_VERSION" = ''; then
 
119
                # but have not detected it
 
120
                AC_MSG_ERROR(failed to find pppd/patchlevel.h: no ppp support.)
 
121
        fi
 
122
        ;;
 
123
esac
 
124
 
 
125
AC_SUBST(PPPD_VERSION)
 
126
 
 
127
AC_CONFIG_FILES([build_tools/menuselect-deps makeopts build_tools/make_firmware_object])
 
128
AC_OUTPUT
 
129
chmod a+x  build_tools/make_firmware_object
 
130
 
 
131
AC_MSG_NOTICE(*** Zaptel build successfully configured ***)
 
132