summaryrefslogtreecommitdiff
path: root/menuselect
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2014-07-18 00:07:48 +0000
committerSean Bright <sean@malleable.com>2014-07-18 00:07:48 +0000
commit84b9f5eff5b3145da88ca7f3fc873fd62d018218 (patch)
tree4c9794d406ce475f97e56d858f540d7c55711476 /menuselect
parentfc0fecb4768d696db3324bcf6dd03325bb4cd513 (diff)
Import Asterisk's autoconf magic instead of using our own.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'menuselect')
-rw-r--r--menuselect/acinclude.m4241
-rw-r--r--menuselect/aclocal.m414
-rw-r--r--menuselect/autoconfig.h.in6
-rwxr-xr-xmenuselect/bootstrap.sh4
-rwxr-xr-xmenuselect/configure760
5 files changed, 420 insertions, 605 deletions
diff --git a/menuselect/acinclude.m4 b/menuselect/acinclude.m4
deleted file mode 100644
index 361457706..000000000
--- a/menuselect/acinclude.m4
+++ /dev/null
@@ -1,241 +0,0 @@
-# Helper function to check for gcc attributes.
-# AST_GCC_ATTRIBUTE([attribute name], [attribute syntax], [attribute scope], [makeopts flag])
-
-AC_DEFUN([AST_GCC_ATTRIBUTE],
-[
-AC_MSG_CHECKING(checking for compiler 'attribute $1' support)
-saved_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
-m4_ifval([$4],$4=0)
-
-if test "x$2" = "x"
-then
-AC_COMPILE_IFELSE(
- AC_LANG_PROGRAM([$3 void __attribute__(($1)) *test(void *muffin, ...) {return (void *) 0;}],
- []),
- AC_MSG_RESULT(yes)
- m4_ifval([$4],$4=1)
- AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]),
- AC_MSG_RESULT(no)
-)
-else
-AC_COMPILE_IFELSE(
- AC_LANG_PROGRAM([$3 void __attribute__(($2)) *test(void *muffin, ...) {return (void *) 0;}],
- []),
- AC_MSG_RESULT(yes)
- m4_ifval([$4],$4=1)
- AC_DEFINE_UNQUOTED([HAVE_ATTRIBUTE_$1], 1, [Define to 1 if your GCC C compiler supports the '$1' attribute.]),
- AC_MSG_RESULT(no)
-)
-fi
-
-m4_ifval([$4],[AC_SUBST($4)])
-CFLAGS="$saved_CFLAGS"
-])
-
-# 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)
- $1_MANDATORY="yes"
- ;;
- *)
- $1_DIR="${withval}"
- $1_MANDATORY="yes"
- ;;
-esac
-])
-PBX_$1=0
-AC_SUBST([$1_LIB])
-AC_SUBST([$1_INCLUDE])
-AC_SUBST([PBX_$1])
-])
-
-# AST_EXT_LIB_CHECK([package symbol name], [package library name], [function to check], [package header], [additional LIB data])
-
-AC_DEFUN([AST_EXT_LIB_CHECK],
-[
-if test "${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
- AC_CHECK_LIB([$2], [$3], [AST_$1_FOUND=yes], [AST_$1_FOUND=no], ${pbxlibdir} $5)
-
- 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
- if test ! -z "${$1_MANDATORY}" ;
- then
- AC_MSG_NOTICE( ***)
- AC_MSG_NOTICE( *** It appears that you do not have the $2 development package installed.)
- AC_MSG_NOTICE( *** Please install it to include ${$1_DESCRIP} support, or re-run configure)
- AC_MSG_NOTICE( *** without explicitly specifying --with-${$1_OPTION})
- exit 1
- fi
- $1_LIB=""
- $1_INCLUDE=""
- PBX_$1=0
- else
- PBX_$1=1
- AC_DEFINE_UNQUOTED([HAVE_$1], 1, [Define to indicate the ${$1_DESCRIP} library])
- fi
- elif test ! -z "${$1_MANDATORY}";
- then
- AC_MSG_NOTICE(***)
- AC_MSG_NOTICE(*** The ${$1_DESCRIP} installation on this system appears to be broken.)
- AC_MSG_NOTICE(*** Either correct the installation, or run configure)
- AC_MSG_NOTICE(*** without explicitly specifying --with-${$1_OPTION})
- exit 1
- fi
-fi
-])
-
-
-AC_DEFUN(
-[AST_CHECK_GNU_MAKE], [AC_CACHE_CHECK([for GNU make], [ac_cv_GNU_MAKE],
- ac_cv_GNU_MAKE='Not Found' ;
- ac_cv_GNU_MAKE_VERSION_MAJOR=0 ;
- ac_cv_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
- ac_cv_GNU_MAKE=$a ;
- ac_cv_GNU_MAKE_VERSION_MAJOR=`$ac_cv_GNU_MAKE --version | grep "GNU Make" | cut -f3 -d' ' | cut -f1 -d'.'`
- ac_cv_GNU_MAKE_VERSION_MINOR=`$ac_cv_GNU_MAKE --version | grep "GNU Make" | cut -f2 -d'.' | cut -c1-2`
- break;
- fi
- done ;
-) ;
-if test "x$ac_cv_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_cv_GNU_MAKE])
-])
-
-# 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* | *-*-linux-uclibc* )
- # 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
-
-# Check for a package using $2-config. Similar to AST_EXT_LIB_CHECK,
-# but use $2-config to determine cflags and libraries to use.
-# $3 and $4 can be used to replace --cflags and --libs in the request
-
-# AST_EXT_TOOL_CHECK([package], [tool name], [--cflags], [--libs], [includes], [expression])
-AC_DEFUN([AST_EXT_TOOL_CHECK],
-[
- if test "x${PBX_$1}" != "x1" -a "${USE_$1}" != "no"; then
- PBX_$1=0
- AC_PATH_TOOL(CONFIG_$1, $2, No, [${$1_DIR}/bin:$PATH])
- if test ! "x${CONFIG_$1}" = xNo; then
- if test x"$3" = x ; then A=--cflags ; else A="$3" ; fi
- $1_INCLUDE=$(${CONFIG_$1} $A)
- $1_INCLUDE=$(echo ${$1_INCLUDE} | sed -e "s|-I|-I${$1_DIR}|g")
-
- if test x"$4" = x ; then A=--libs ; else A="$4" ; fi
- $1_LIB=$(${CONFIG_$1} $A)
- $1_LIB=$(echo ${$1_LIB} | sed -e "s|-L|-L${$1_DIR}|g")
-
- if test x"$5" != x ; then
- saved_cppflags="${CPPFLAGS}"
- CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"
-
- saved_libs="${LIBS}"
- LIBS=${$1_LIB}
-
- AC_LINK_IFELSE(
- [ AC_LANG_PROGRAM( [ $5 ], [ $6; ])],
- [ PBX_$1=1 AC_DEFINE([HAVE_$1], 1,
- [Define if your system has the $1 headers.])],
- []
- )
- CPPFLAGS="${saved_cppflags}"
- LIBS="${saved_libs}"
- else
- PBX_$1=1
- AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 libraries.])
- fi
- fi
- fi
-])
diff --git a/menuselect/aclocal.m4 b/menuselect/aclocal.m4
index 9f2b60655..8b547156d 100644
--- a/menuselect/aclocal.m4
+++ b/menuselect/aclocal.m4
@@ -1,8 +1,7 @@
-# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
+# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -12,4 +11,9 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-m4_include([acinclude.m4])
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_include([../autoconf/ast_check_gnu_make.m4])
+m4_include([../autoconf/ast_ext_lib.m4])
+m4_include([../autoconf/ast_ext_tool_check.m4])
+m4_include([../autoconf/ast_gcc_attribute.m4])
+m4_include([../autoconf/ast_prog_sed.m4])
diff --git a/menuselect/autoconfig.h.in b/menuselect/autoconfig.h.in
index bac73f3ab..9cafa567b 100644
--- a/menuselect/autoconfig.h.in
+++ b/menuselect/autoconfig.h.in
@@ -35,7 +35,7 @@
/* Define to 1 if your GCC C compiler supports the 'weakref' attribute. */
#undef HAVE_ATTRIBUTE_weakref
-/* Define to indicate the ${CURSES_DESCRIP} library */
+/* Define to 1 if you have the curses library. */
#undef HAVE_CURSES
/* Define to 1 if you have the `getloadavg' function. */
@@ -53,10 +53,10 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
-/* Define to indicate the ${NCURSES_DESCRIP} library */
+/* Define to 1 if you have the ncurses library. */
#undef HAVE_NCURSES
-/* Define to indicate the ${NEWT_DESCRIP} library */
+/* Define to 1 if you have the newt library. */
#undef HAVE_NEWT
/* Define to 1 if you have the `setenv' function. */
diff --git a/menuselect/bootstrap.sh b/menuselect/bootstrap.sh
index cbc26aa2f..8cf5e7126 100755
--- a/menuselect/bootstrap.sh
+++ b/menuselect/bootstrap.sh
@@ -17,7 +17,7 @@ then
check_for_app automake19
check_for_app aclocal19
echo "Generating the configure script ..."
- aclocal19 2>/dev/null
+ aclocal19 -I ../autoconf 2>/dev/null
autoconf259
autoheader259
automake19 --add-missing --copy 2>/dev/null
@@ -32,7 +32,7 @@ else
check_for_app automake
check_for_app aclocal
echo "Generating the configure script ..."
- aclocal 2>/dev/null
+ aclocal -I ../autoconf 2>/dev/null
autoconf
autoheader
automake --add-missing --copy 2>/dev/null
diff --git a/menuselect/configure b/menuselect/configure
index eded6ab93..508137138 100755
--- a/menuselect/configure
+++ b/menuselect/configure
@@ -1,12 +1,10 @@
#! /bin/sh
-# From configure.ac Revision: 418834 .
+# From configure.ac Revision: 418850 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68.
+# Generated by GNU Autoconf 2.69.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -137,6 +135,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -170,7 +193,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -215,21 +239,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -331,6 +359,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -452,6 +488,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -486,16 +526,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -507,28 +547,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -610,16 +630,21 @@ GTK2_INCLUDE
PBX_GTK2
PKGCONFIG
CONFIG_LIBXML2
+SED
PBX_LIBXML2
+LIBXML2_DIR
LIBXML2_INCLUDE
LIBXML2_LIB
PBX_NCURSES
+NCURSES_DIR
NCURSES_INCLUDE
NCURSES_LIB
PBX_CURSES
+CURSES_DIR
CURSES_INCLUDE
CURSES_LIB
PBX_NEWT
+NEWT_DIR
NEWT_INCLUDE
NEWT_LIB
ALLOCA
@@ -1156,8 +1181,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1401,9 +1424,9 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
configure
-generated by GNU Autoconf 2.68
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
@@ -1645,7 +1668,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -1822,7 +1845,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2341,7 +2364,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2381,7 +2404,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2434,7 +2457,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2475,7 +2498,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -2533,7 +2556,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -2577,7 +2600,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3023,8 +3046,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -3168,8 +3190,8 @@ case "${OSARCH}" in
#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for compiler 'attribute weak_import' support" >&5
-$as_echo_n "checking checking for compiler 'attribute weak_import' support... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute weak_import' support" >&5
+$as_echo_n "checking for compiler 'attribute weak_import' support... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
PBX_WEAKREF=0
@@ -3235,12 +3257,13 @@ fi
CFLAGS="$saved_CFLAGS"
+
# Several other platforms including Linux have GCC versions that
# define the weak attribute. However, this attribute is only
# setup for use in the code by Darwin.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for compiler 'attribute weak' support" >&5
-$as_echo_n "checking checking for compiler 'attribute weak' support... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute weak' support" >&5
+$as_echo_n "checking for compiler 'attribute weak' support... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
PBX_WEAKREF=0
@@ -3305,13 +3328,14 @@ fi
CFLAGS="$saved_CFLAGS"
+
;;
linux-gnu)
# Primarily support weak symbols on Linux platforms.
#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for compiler 'attribute weakref' support" >&5
-$as_echo_n "checking checking for compiler 'attribute weakref' support... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute weakref' support" >&5
+$as_echo_n "checking for compiler 'attribute weakref' support... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
PBX_WEAKREF=0
@@ -3376,6 +3400,7 @@ fi
CFLAGS="$saved_CFLAGS"
+
;;
*)
# Allow weak symbols on other platforms. However, any problems
@@ -3383,8 +3408,8 @@ CFLAGS="$saved_CFLAGS"
# community.
#
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for compiler 'attribute weakref' support" >&5
-$as_echo_n "checking checking for compiler 'attribute weakref' support... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler 'attribute weakref' support" >&5
+$as_echo_n "checking for compiler 'attribute weakref' support... " >&6; }
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Wall -Wno-unused -Werror"
PBX_WEAKREF=0
@@ -3449,6 +3474,7 @@ fi
CFLAGS="$saved_CFLAGS"
+
;;
esac
@@ -3606,7 +3632,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -3672,7 +3698,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -4011,23 +4037,20 @@ else
/* end confdefs.h. */
$ac_includes_default
int
-find_stack_direction ()
+find_stack_direction (int *addr, int depth)
{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
+ int dir, dummy = 0;
+ if (! addr)
+ addr = &dummy;
+ *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
+ dir = depth ? find_stack_direction (addr, depth - 1) : 0;
+ return dir + dummy;
}
int
-main ()
+main (int argc, char **argv)
{
- return find_stack_direction () < 0;
+ return find_stack_direction (0, argc + !argv + 20) < 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
@@ -4065,127 +4088,155 @@ done
# The frontend can use curses, ncurses, newt or GTK2 so check for all of them
-NEWT_DESCRIP="newt"
-NEWT_OPTION="newt"
+ NEWT_DESCRIP="newt"
+ NEWT_OPTION="newt"
+ PBX_NEWT=0
# Check whether --with-newt was given.
if test "${with_newt+set}" = set; then :
withval=$with_newt;
-case ${withval} in
- n|no)
- USE_NEWT=no
- ;;
- y|ye|yes)
- NEWT_MANDATORY="yes"
- ;;
- *)
- NEWT_DIR="${withval}"
- NEWT_MANDATORY="yes"
- ;;
-esac
+ case ${withval} in
+ n|no)
+ USE_NEWT=no
+ # -1 is a magic value used by menuselect to know that the package
+ # was disabled, other than 'not found'
+ PBX_NEWT=-1
+ ;;
+ y|ye|yes)
+ ac_mandatory_list="${ac_mandatory_list} NEWT"
+ ;;
+ *)
+ NEWT_DIR="${withval}"
+ ac_mandatory_list="${ac_mandatory_list} NEWT"
+ ;;
+ esac
fi
-PBX_NEWT=0
-CURSES_DESCRIP="curses"
-CURSES_OPTION="curses"
+
+
+ CURSES_DESCRIP="curses"
+ CURSES_OPTION="curses"
+ PBX_CURSES=0
# Check whether --with-curses was given.
if test "${with_curses+set}" = set; then :
withval=$with_curses;
-case ${withval} in
- n|no)
- USE_CURSES=no
- ;;
- y|ye|yes)
- CURSES_MANDATORY="yes"
- ;;
- *)
- CURSES_DIR="${withval}"
- CURSES_MANDATORY="yes"
- ;;
-esac
+ case ${withval} in
+ n|no)
+ USE_CURSES=no
+ # -1 is a magic value used by menuselect to know that the package
+ # was disabled, other than 'not found'
+ PBX_CURSES=-1
+ ;;
+ y|ye|yes)
+ ac_mandatory_list="${ac_mandatory_list} CURSES"
+ ;;
+ *)
+ CURSES_DIR="${withval}"
+ ac_mandatory_list="${ac_mandatory_list} CURSES"
+ ;;
+ esac
fi
-PBX_CURSES=0
-NCURSES_DESCRIP="ncurses"
-NCURSES_OPTION="ncurses"
+
+
+ NCURSES_DESCRIP="ncurses"
+ NCURSES_OPTION="ncurses"
+ PBX_NCURSES=0
# Check whether --with-ncurses was given.
if test "${with_ncurses+set}" = set; then :
withval=$with_ncurses;
-case ${withval} in
- n|no)
- USE_NCURSES=no
- ;;
- y|ye|yes)
- NCURSES_MANDATORY="yes"
- ;;
- *)
- NCURSES_DIR="${withval}"
- NCURSES_MANDATORY="yes"
- ;;
-esac
+ case ${withval} in
+ n|no)
+ USE_NCURSES=no
+ # -1 is a magic value used by menuselect to know that the package
+ # was disabled, other than 'not found'
+ PBX_NCURSES=-1
+ ;;
+ y|ye|yes)
+ ac_mandatory_list="${ac_mandatory_list} NCURSES"
+ ;;
+ *)
+ NCURSES_DIR="${withval}"
+ ac_mandatory_list="${ac_mandatory_list} NCURSES"
+ ;;
+ esac
fi
-PBX_NCURSES=0
-LIBXML2_DESCRIP="LibXML2"
-LIBXML2_OPTION="libxml2"
+
+
+ LIBXML2_DESCRIP="LibXML2"
+ LIBXML2_OPTION="libxml2"
+ PBX_LIBXML2=0
# Check whether --with-libxml2 was given.
if test "${with_libxml2+set}" = set; then :
withval=$with_libxml2;
-case ${withval} in
- n|no)
- USE_LIBXML2=no
- ;;
- y|ye|yes)
- LIBXML2_MANDATORY="yes"
- ;;
- *)
- LIBXML2_DIR="${withval}"
- LIBXML2_MANDATORY="yes"
- ;;
-esac
+ case ${withval} in
+ n|no)
+ USE_LIBXML2=no
+ # -1 is a magic value used by menuselect to know that the package
+ # was disabled, other than 'not found'
+ PBX_LIBXML2=-1
+ ;;
+ y|ye|yes)
+ ac_mandatory_list="${ac_mandatory_list} LIBXML2"
+ ;;
+ *)
+ LIBXML2_DIR="${withval}"
+ ac_mandatory_list="${ac_mandatory_list} LIBXML2"
+ ;;
+ esac
fi
-PBX_LIBXML2=0
-if test "${USE_NEWT}" != "no"; then
+
+
+if test "x${PBX_NEWT}" != "x1" -a "${USE_NEWT}" != "no"; then
pbxlibdir=""
+ # if --with-NEWT=DIR has been specified, use it.
if test "x${NEWT_DIR}" != "x"; then
if test -d ${NEWT_DIR}/lib; then
- pbxlibdir="-L${NEWT_DIR}/lib"
+ pbxlibdir="-L${NEWT_DIR}/lib"
else
- pbxlibdir="-L${NEWT_DIR}"
+ pbxlibdir="-L${NEWT_DIR}"
fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for newtBell in -lnewt" >&5
-$as_echo_n "checking for newtBell in -lnewt... " >&6; }
-if ${ac_cv_lib_newt_newtBell+:} false; then :
+ pbxfuncname="newtBell"
+ if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
+ AST_NEWT_FOUND=yes
+ else
+ ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
+ CFLAGS="${CFLAGS} "
+ as_ac_Lib=`$as_echo "ac_cv_lib_newt_${pbxfuncname}" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lnewt" >&5
+$as_echo_n "checking for ${pbxfuncname} in -lnewt... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -4199,53 +4250,50 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char newtBell ();
+char ${pbxfuncname} ();
int
main ()
{
-return newtBell ();
+return ${pbxfuncname} ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_newt_newtBell=yes
+ eval "$as_ac_Lib=yes"
else
- ac_cv_lib_newt_newtBell=no
+ eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_newt_newtBell" >&5
-$as_echo "$ac_cv_lib_newt_newtBell" >&6; }
-if test "x$ac_cv_lib_newt_newtBell" = xyes; then :
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_NEWT_FOUND=yes
else
AST_NEWT_FOUND=no
fi
+ CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
+ fi
+ # now check for the header.
if test "${AST_NEWT_FOUND}" = "yes"; then
- NEWT_LIB="-lnewt "
- NEWT_HEADER_FOUND="1"
+ NEWT_LIB="${pbxlibdir} -lnewt "
+ # if --with-NEWT=DIR has been specified, use it.
if test "x${NEWT_DIR}" != "x"; then
- NEWT_LIB="${pbxlibdir} ${NEWT_LIB}"
- NEWT_INCLUDE="-I${NEWT_DIR}/include"
- if test "xnewt.h" != "x" ; then
- as_ac_Header=`$as_echo "ac_cv_header_${NEWT_DIR}/include/newt.h" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "${NEWT_DIR}/include/newt.h" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- NEWT_HEADER_FOUND=1
-else
- NEWT_HEADER_FOUND=0
-fi
-
-
- fi
- else
- if test "xnewt.h" != "x" ; then
- ac_fn_c_check_header_mongrel "$LINENO" "newt.h" "ac_cv_header_newt_h" "$ac_includes_default"
+ NEWT_INCLUDE="-I${NEWT_DIR}/include"
+ fi
+ NEWT_INCLUDE="${NEWT_INCLUDE} "
+ if test "xnewt.h" = "x" ; then # no header, assume found
+ NEWT_HEADER_FOUND="1"
+ else # check for the header
+ ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${NEWT_INCLUDE}"
+ ac_fn_c_check_header_mongrel "$LINENO" "newt.h" "ac_cv_header_newt_h" "$ac_includes_default"
if test "x$ac_cv_header_newt_h" = xyes; then :
NEWT_HEADER_FOUND=1
else
@@ -4253,59 +4301,46 @@ else
fi
- fi
+ CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
fi
if test "x${NEWT_HEADER_FOUND}" = "x0" ; then
- if test ! -z "${NEWT_MANDATORY}" ;
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: ***" >&5
-$as_echo "$as_me: ***" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** It appears that you do not have the newt development package installed." >&5
-$as_echo "$as_me: *** It appears that you do not have the newt development package installed." >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** Please install it to include ${NEWT_DESCRIP} support" >&5
-$as_echo "$as_me: *** Please install it to include ${NEWT_DESCRIP} support" >&or re-run configure;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** without explicitly specifying --with-${NEWT_OPTION}" >&5
-$as_echo "$as_me: *** without explicitly specifying --with-${NEWT_OPTION}" >&6;}
- exit 1
- fi
NEWT_LIB=""
NEWT_INCLUDE=""
- PBX_NEWT=0
else
+ if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
+ NEWT_LIB=""
+ fi
PBX_NEWT=1
-
-cat >>confdefs.h <<_ACEOF
+ cat >>confdefs.h <<_ACEOF
#define HAVE_NEWT 1
_ACEOF
fi
- elif test ! -z "${NEWT_MANDATORY}";
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: ***" >&5
-$as_echo "$as_me: ***" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** The ${NEWT_DESCRIP} installation on this system appears to be broken." >&5
-$as_echo "$as_me: *** The ${NEWT_DESCRIP} installation on this system appears to be broken." >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** Either correct the installation" >&5
-$as_echo "$as_me: *** Either correct the installation" >&or run configure;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** without explicitly specifying --with-${NEWT_OPTION}" >&5
-$as_echo "$as_me: *** without explicitly specifying --with-${NEWT_OPTION}" >&6;}
- exit 1
fi
fi
-if test "${USE_CURSES}" != "no"; then
+
+if test "x${PBX_CURSES}" != "x1" -a "${USE_CURSES}" != "no"; then
pbxlibdir=""
+ # if --with-CURSES=DIR has been specified, use it.
if test "x${CURSES_DIR}" != "x"; then
if test -d ${CURSES_DIR}/lib; then
- pbxlibdir="-L${CURSES_DIR}/lib"
+ pbxlibdir="-L${CURSES_DIR}/lib"
else
- pbxlibdir="-L${CURSES_DIR}"
+ pbxlibdir="-L${CURSES_DIR}"
fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lcurses" >&5
-$as_echo_n "checking for initscr in -lcurses... " >&6; }
-if ${ac_cv_lib_curses_initscr+:} false; then :
+ pbxfuncname="initscr"
+ if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
+ AST_CURSES_FOUND=yes
+ else
+ ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
+ CFLAGS="${CFLAGS} "
+ as_ac_Lib=`$as_echo "ac_cv_lib_curses_${pbxfuncname}" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcurses" >&5
+$as_echo_n "checking for ${pbxfuncname} in -lcurses... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -4319,53 +4354,50 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char initscr ();
+char ${pbxfuncname} ();
int
main ()
{
-return initscr ();
+return ${pbxfuncname} ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_curses_initscr=yes
+ eval "$as_ac_Lib=yes"
else
- ac_cv_lib_curses_initscr=no
+ eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_initscr" >&5
-$as_echo "$ac_cv_lib_curses_initscr" >&6; }
-if test "x$ac_cv_lib_curses_initscr" = xyes; then :
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_CURSES_FOUND=yes
else
AST_CURSES_FOUND=no
fi
+ CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
+ fi
+ # now check for the header.
if test "${AST_CURSES_FOUND}" = "yes"; then
- CURSES_LIB="-lcurses "
- CURSES_HEADER_FOUND="1"
+ CURSES_LIB="${pbxlibdir} -lcurses "
+ # if --with-CURSES=DIR has been specified, use it.
if test "x${CURSES_DIR}" != "x"; then
- CURSES_LIB="${pbxlibdir} ${CURSES_LIB}"
- CURSES_INCLUDE="-I${CURSES_DIR}/include"
- if test "xcurses.h" != "x" ; then
- as_ac_Header=`$as_echo "ac_cv_header_${CURSES_DIR}/include/curses.h" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "${CURSES_DIR}/include/curses.h" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- CURSES_HEADER_FOUND=1
-else
- CURSES_HEADER_FOUND=0
-fi
-
-
- fi
- else
- if test "xcurses.h" != "x" ; then
- ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default"
+ CURSES_INCLUDE="-I${CURSES_DIR}/include"
+ fi
+ CURSES_INCLUDE="${CURSES_INCLUDE} "
+ if test "xcurses.h" = "x" ; then # no header, assume found
+ CURSES_HEADER_FOUND="1"
+ else # check for the header
+ ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${CURSES_INCLUDE}"
+ ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default"
if test "x$ac_cv_header_curses_h" = xyes; then :
CURSES_HEADER_FOUND=1
else
@@ -4373,59 +4405,46 @@ else
fi
- fi
+ CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
fi
if test "x${CURSES_HEADER_FOUND}" = "x0" ; then
- if test ! -z "${CURSES_MANDATORY}" ;
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: ***" >&5
-$as_echo "$as_me: ***" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** It appears that you do not have the curses development package installed." >&5
-$as_echo "$as_me: *** It appears that you do not have the curses development package installed." >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** Please install it to include ${CURSES_DESCRIP} support" >&5
-$as_echo "$as_me: *** Please install it to include ${CURSES_DESCRIP} support" >&or re-run configure;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** without explicitly specifying --with-${CURSES_OPTION}" >&5
-$as_echo "$as_me: *** without explicitly specifying --with-${CURSES_OPTION}" >&6;}
- exit 1
- fi
CURSES_LIB=""
CURSES_INCLUDE=""
- PBX_CURSES=0
else
+ if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
+ CURSES_LIB=""
+ fi
PBX_CURSES=1
-
-cat >>confdefs.h <<_ACEOF
+ cat >>confdefs.h <<_ACEOF
#define HAVE_CURSES 1
_ACEOF
fi
- elif test ! -z "${CURSES_MANDATORY}";
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: ***" >&5
-$as_echo "$as_me: ***" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** The ${CURSES_DESCRIP} installation on this system appears to be broken." >&5
-$as_echo "$as_me: *** The ${CURSES_DESCRIP} installation on this system appears to be broken." >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** Either correct the installation" >&5
-$as_echo "$as_me: *** Either correct the installation" >&or run configure;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** without explicitly specifying --with-${CURSES_OPTION}" >&5
-$as_echo "$as_me: *** without explicitly specifying --with-${CURSES_OPTION}" >&6;}
- exit 1
fi
fi
-if test "${USE_NCURSES}" != "no"; then
+
+if test "x${PBX_NCURSES}" != "x1" -a "${USE_NCURSES}" != "no"; then
pbxlibdir=""
+ # if --with-NCURSES=DIR has been specified, use it.
if test "x${NCURSES_DIR}" != "x"; then
if test -d ${NCURSES_DIR}/lib; then
- pbxlibdir="-L${NCURSES_DIR}/lib"
+ pbxlibdir="-L${NCURSES_DIR}/lib"
else
- pbxlibdir="-L${NCURSES_DIR}"
+ pbxlibdir="-L${NCURSES_DIR}"
fi
fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncurses" >&5
-$as_echo_n "checking for initscr in -lncurses... " >&6; }
-if ${ac_cv_lib_ncurses_initscr+:} false; then :
+ pbxfuncname="initscr"
+ if test "x${pbxfuncname}" = "x" ; then # empty lib, assume only headers
+ AST_NCURSES_FOUND=yes
+ else
+ ast_ext_lib_check_save_CFLAGS="${CFLAGS}"
+ CFLAGS="${CFLAGS} "
+ as_ac_Lib=`$as_echo "ac_cv_lib_ncurses_${pbxfuncname}" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lncurses" >&5
+$as_echo_n "checking for ${pbxfuncname} in -lncurses... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -4439,53 +4458,50 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char initscr ();
+char ${pbxfuncname} ();
int
main ()
{
-return initscr ();
+return ${pbxfuncname} ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_ncurses_initscr=yes
+ eval "$as_ac_Lib=yes"
else
- ac_cv_lib_ncurses_initscr=no
+ eval "$as_ac_Lib=no"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5
-$as_echo "$ac_cv_lib_ncurses_initscr" >&6; }
-if test "x$ac_cv_lib_ncurses_initscr" = xyes; then :
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_NCURSES_FOUND=yes
else
AST_NCURSES_FOUND=no
fi
+ CFLAGS="${ast_ext_lib_check_save_CFLAGS}"
+ fi
+ # now check for the header.
if test "${AST_NCURSES_FOUND}" = "yes"; then
- NCURSES_LIB="-lncurses "
- NCURSES_HEADER_FOUND="1"
+ NCURSES_LIB="${pbxlibdir} -lncurses "
+ # if --with-NCURSES=DIR has been specified, use it.
if test "x${NCURSES_DIR}" != "x"; then
- NCURSES_LIB="${pbxlibdir} ${NCURSES_LIB}"
- NCURSES_INCLUDE="-I${NCURSES_DIR}/include"
- if test "xcurses.h" != "x" ; then
- as_ac_Header=`$as_echo "ac_cv_header_${NCURSES_DIR}/include/curses.h" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "${NCURSES_DIR}/include/curses.h" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- NCURSES_HEADER_FOUND=1
-else
- NCURSES_HEADER_FOUND=0
-fi
-
-
- fi
- else
- if test "xcurses.h" != "x" ; then
- ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default"
+ NCURSES_INCLUDE="-I${NCURSES_DIR}/include"
+ fi
+ NCURSES_INCLUDE="${NCURSES_INCLUDE} "
+ if test "xcurses.h" = "x" ; then # no header, assume found
+ NCURSES_HEADER_FOUND="1"
+ else # check for the header
+ ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"
+ CPPFLAGS="${CPPFLAGS} ${NCURSES_INCLUDE}"
+ ac_fn_c_check_header_mongrel "$LINENO" "curses.h" "ac_cv_header_curses_h" "$ac_includes_default"
if test "x$ac_cv_header_curses_h" = xyes; then :
NCURSES_HEADER_FOUND=1
else
@@ -4493,48 +4509,96 @@ else
fi
- fi
+ CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"
fi
if test "x${NCURSES_HEADER_FOUND}" = "x0" ; then
- if test ! -z "${NCURSES_MANDATORY}" ;
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: ***" >&5
-$as_echo "$as_me: ***" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** It appears that you do not have the ncurses development package installed." >&5
-$as_echo "$as_me: *** It appears that you do not have the ncurses development package installed." >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** Please install it to include ${NCURSES_DESCRIP} support" >&5
-$as_echo "$as_me: *** Please install it to include ${NCURSES_DESCRIP} support" >&or re-run configure;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** without explicitly specifying --with-${NCURSES_OPTION}" >&5
-$as_echo "$as_me: *** without explicitly specifying --with-${NCURSES_OPTION}" >&6;}
- exit 1
- fi
NCURSES_LIB=""
NCURSES_INCLUDE=""
- PBX_NCURSES=0
else
+ if test "x${pbxfuncname}" = "x" ; then # only checking headers -> no library
+ NCURSES_LIB=""
+ fi
PBX_NCURSES=1
-
-cat >>confdefs.h <<_ACEOF
+ cat >>confdefs.h <<_ACEOF
#define HAVE_NCURSES 1
_ACEOF
fi
- elif test ! -z "${NCURSES_MANDATORY}";
- then
- { $as_echo "$as_me:${as_lineno-$LINENO}: ***" >&5
-$as_echo "$as_me: ***" >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** The ${NCURSES_DESCRIP} installation on this system appears to be broken." >&5
-$as_echo "$as_me: *** The ${NCURSES_DESCRIP} installation on this system appears to be broken." >&6;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** Either correct the installation" >&5
-$as_echo "$as_me: *** Either correct the installation" >&or run configure;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: *** without explicitly specifying --with-${NCURSES_OPTION}" >&5
-$as_echo "$as_me: *** without explicitly specifying --with-${NCURSES_OPTION}" >&6;}
- exit 1
fi
fi
- if test "x${PBX_LIBXML2}" != "x1" -a "${USE_LIBXML2}" != "no"; then
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if ${ac_cv_path_SED+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ 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=
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_SED" || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+
+ if test "x${PBX_LIBXML2}" != "x1" -a "${USE_LIBXML2}" != "no"; then
PBX_LIBXML2=0
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}xml2-config", so it can be a program name with args.
@@ -4556,7 +4620,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_CONFIG_LIBXML2="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4600,7 +4664,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_path_ac_pt_CONFIG_LIBXML2="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4639,11 +4703,11 @@ fi
if test ! "x${CONFIG_LIBXML2}" = xNo; then
if test x"" = x ; then A=--cflags ; else A="" ; fi
LIBXML2_INCLUDE=$(${CONFIG_LIBXML2} $A)
- LIBXML2_INCLUDE=$(echo ${LIBXML2_INCLUDE} | sed -e "s|-I|-I${LIBXML2_DIR}|g")
+ LIBXML2_INCLUDE=$(echo ${LIBXML2_INCLUDE} | $SED -e "s|-I|-I${LIBXML2_DIR}|g")
if test x"" = x ; then A=--libs ; else A="" ; fi
LIBXML2_LIB=$(${CONFIG_LIBXML2} $A)
- LIBXML2_LIB=$(echo ${LIBXML2_LIB} | sed -e "s|-L|-L${LIBXML2_DIR}|g")
+ LIBXML2_LIB=$(echo ${LIBXML2_LIB} | $SED -e "s|-L|-L${LIBXML2_DIR}|g")
if test x"#include <libxml/tree.h>
#include <libxml/parser.h>" != x ; then
@@ -4706,7 +4770,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_PKGCONFIG="${ac_tool_prefix}pkg-config"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4746,7 +4810,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_PKGCONFIG="pkg-config"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5204,16 +5268,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -5273,28 +5337,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -5316,7 +5368,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -5378,10 +5430,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.68,
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -5469,7 +5521,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'