1
# Process this file with autoconf to produce a configure script.
5
m4_define([ZAP_VERSION],
6
m4_bpatsubst(m4_esyscmd([build_tools/make_version .]),
7
[\([0-9.]*\)\(\w\|\W\)*],
9
AC_INIT(zaptel, ZAP_VERSION, www.asterisk.org)
11
# check existence of the package
12
AC_CONFIG_SRCDIR([kernel/zaptel-base.c])
14
AC_COPYRIGHT("Zaptel")
15
AC_REVISION($Revision: 3793 $)
17
ac_default_prefix=/usr
18
if test ${sysconfdir} = '${prefix}/etc'; then
21
if test ${mandir} = '${prefix}/man'; then
25
if test ${localstatedir} = '${prefix}/var'; then
29
# This needs to be before any macros that use the C compiler
32
# Checks for programs.
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/"`
47
# Set the default value of HOSTCC from CC if --host was not provided:
48
HOSTCC=${HOSTCC:=${CC}}
51
AC_PATH_PROG([GREP], [grep], :)
52
AC_PATH_PROG([SHELL], [sh], :)
53
AC_PATH_PROG([LN], [ln], :)
55
AC_PATH_PROG([WGET], [wget], :)
56
if test "${WGET}" != ":" ; then
59
AC_PATH_PROG([FETCH], [fetch], [:])
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])
72
[AS_HELP_STRING([--with-selinux],
73
[enable (with) / disable (without) SELinux])],
74
[USE_SELINUX=$withval],
75
[ if test ! -x /usr/sbin/sestatus; then
77
elif /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"; then
86
# for asciidoc before ver. 7, the backend must be stated explicitly:
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"
95
[AS_HELP_STRING([--with-ppp=PATH],[Use ppp support from PATH])],
99
# somebody will fix that
100
default_ppp_path=/usr
103
yes|check) ppp_path="$default_ppp_path";;
105
*) ppp_path="$with_ppp" ;;
108
level_file="$ppp_path/include/pppd/patchlevel.h"
110
if test "$ppp_path" != '' && test -r "$level_file"; then
111
PPPD_VERSION=`awk -F '"' '/VERSION/ { print $$2; }' $level_file`
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.)
125
AC_SUBST(PPPD_VERSION)
127
AC_CONFIG_FILES([build_tools/menuselect-deps makeopts build_tools/make_firmware_object])
129
chmod a+x build_tools/make_firmware_object
131
AC_MSG_NOTICE(*** Zaptel build successfully configured ***)