diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2011-09-13 18:56:45 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2011-09-13 18:56:45 +0000 |
commit | 1bf2d9e9c615686421bd12a556b51f7884705d03 (patch) | |
tree | 34f37ad719c34ba47453bad2ad5fcfdbe099f407 /configure.ac | |
parent | b292ff3b326cfaac9fd4846c6e34198dd50492e8 (diff) |
Merged revisions 335656 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10
................
r335656 | tilghman | 2011-09-13 13:55:33 -0500 (Tue, 13 Sep 2011) | 11 lines
Merged revisions 335655 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r335655 | tilghman | 2011-09-13 13:52:38 -0500 (Tue, 13 Sep 2011) | 4 lines
Move mandatory checks closer to the beginning of the file.
If these are going to fail, they should fail as quickly as possible.
........
................
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@335657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 87 |
1 files changed, 43 insertions, 44 deletions
diff --git a/configure.ac b/configure.ac index bc945ab0e..d8ba950a6 100644 --- a/configure.ac +++ b/configure.ac @@ -475,6 +475,49 @@ AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h strings.h sys/event.h sys/file.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h termios.h unistd.h utime.h arpa/nameser.h sys/io.h]) +# Any one of these 4 packages support a mandatory requirement, so we want to check on them as early as possible. +AST_EXT_LIB_CHECK([TERMCAP], [termcap], [tgetent], []) +AST_EXT_LIB_CHECK([TINFO], [tinfo], [tgetent], []) +AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h]) +AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h]) + +EDITLINE_LIB="" +if test "x$TERMCAP_LIB" != "x" ; then + EDITLINE_LIB="$TERMCAP_LIB" +elif test "x$TINFO_LIB" != "x" ; then + EDITLINE_LIB="$TINFO_LIB" +elif test "x$CURSES_LIB" != "x" ; then + EDITLINE_LIB="$CURSES_LIB" +elif test "x$NCURSES_LIB" != "x" ; then + EDITLINE_LIB="$NCURSES_LIB" +else + AC_MSG_ERROR([*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)]) +fi +AC_SUBST(EDITLINE_LIB) + +# Another mandatory item (unless it's explicitly disabled) +AC_ARG_ENABLE([xmldoc], + [AS_HELP_STRING([--disable-xmldoc], + [Explicity disable XML documentation])], + [case "${enableval}" in + y|ye|yes) disable_xmldoc=no ;; + n|no) disable_xmldoc=yes ;; + *) AC_MSG_ERROR(bad value ${enableval} for --disable-xmldoc) ;; + esac], [disable_xmldoc=no]) + +if test "${disable_xmldoc}" != "yes"; then + AST_EXT_TOOL_CHECK([LIBXML2], [xml2-config], , , + [#include <libxml/tree.h> + #include <libxml/parser.h>], + [LIBXML_TEST_VERSION]) + if test "${PBX_LIBXML2}" != 1; then + AC_MSG_NOTICE(*** XML documentation will not be available because the 'libxml2' development package is missing.) + AC_MSG_NOTICE(*** Please run the 'configure' script with the '--disable-xmldoc' parameter option) + AC_MSG_NOTICE(*** or install the 'libxml2' development package.) + exit 1 + fi +fi + # some embedded systems omit internationalization (locale) support AC_CHECK_HEADERS([xlocale.h]) @@ -1057,8 +1100,6 @@ AST_EXT_LIB_CHECK([ALSA], [asound], [snd_spcm_init], [alsa/asoundlib.h], [-lm -l AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_openr], [bfd.h]) -AST_EXT_LIB_CHECK([CURSES], [curses], [initscr], [curses.h]) - if test "x${OSARCH}" = "xlinux-gnu" ; then AST_EXT_LIB_CHECK([CAP], [cap], [cap_from_text], [sys/capability.h]) fi @@ -1692,28 +1733,6 @@ AST_EXT_LIB_CHECK([LTDL], [ltdl], [lt_dlinit], [ltdl.h], []) AST_EXT_LIB_CHECK([LDAP], [ldap], [ldap_initialize], [ldap.h]) -AC_ARG_ENABLE([xmldoc], - [AS_HELP_STRING([--disable-xmldoc], - [Explicity disable XML documentation])], - [case "${enableval}" in - y|ye|yes) disable_xmldoc=no ;; - n|no) disable_xmldoc=yes ;; - *) AC_MSG_ERROR(bad value ${enableval} for --disable-xmldoc) ;; - esac], [disable_xmldoc=no]) - -if test "${disable_xmldoc}" != "yes"; then - AST_EXT_TOOL_CHECK([LIBXML2], [xml2-config], , , - [#include <libxml/tree.h> - #include <libxml/parser.h>], - [LIBXML_TEST_VERSION]) - if test "${PBX_LIBXML2}" != 1; then - AC_MSG_NOTICE(*** XML documentation will not be available because the 'libxml2' development package is missing.) - AC_MSG_NOTICE(*** Please run the 'configure' script with the '--disable-xmldoc' parameter option) - AC_MSG_NOTICE(*** or install the 'libxml2' development package.) - exit 1 - fi -fi - AST_EXT_LIB_CHECK([MISDN], [mISDN], [mISDN_open], [mISDNuser/mISDNlib.h]) if test "${PBX_MISDN}" = 1; then @@ -1729,8 +1748,6 @@ AST_EXT_TOOL_CHECK([MYSQLCLIENT], [mysql_config]) AST_EXT_LIB_CHECK([NBS], [nbs], [nbs_connect], [nbs.h]) -AST_EXT_LIB_CHECK([NCURSES], [ncurses], [initscr], [curses.h]) - AST_EXT_TOOL_CHECK([NEON], [neon-config]) AST_EXT_TOOL_CHECK([NEON29], [neon-config], , [--libs], @@ -2049,10 +2066,6 @@ AST_EXT_LIB_CHECK([HOARD], [hoard], [malloc], []) AST_EXT_LIB_CHECK([FREETDS], [sybdb], [dbinit], [sybdb.h]) -AST_EXT_LIB_CHECK([TERMCAP], [termcap], [tgetent], []) - -AST_EXT_LIB_CHECK([TINFO], [tinfo], [tgetent], []) - AC_CHECK_LIB([tonezone], [tone_zone_find_by_num], tonezone_does_not_need_lm=yes, tonezone_does_not_need_lm=no) if test "${tonezone_does_not_need_lm}" = "no" ; then @@ -2117,20 +2130,6 @@ AC_LANG_POP AST_EXT_LIB_CHECK([ZLIB], [z], [compress], [zlib.h]) -EDITLINE_LIB="" -if test "x$TERMCAP_LIB" != "x" ; then - EDITLINE_LIB="$TERMCAP_LIB" -elif test "x$TINFO_LIB" != "x" ; then - EDITLINE_LIB="$TINFO_LIB" -elif test "x$CURSES_LIB" != "x" ; then - EDITLINE_LIB="$CURSES_LIB" -elif test "x$NCURSES_LIB" != "x" ; then - EDITLINE_LIB="$NCURSES_LIB" -else - AC_MSG_ERROR([*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)]) -fi -AC_SUBST(EDITLINE_LIB) - if test "x${PBX_UNIXODBC}" = "x1" -o "x${PBX_IODBC}" = "x1"; then # Does ODBC support wide characters? AC_MSG_CHECKING(whether ODBC has support for Unicode types) |