[asterisk-commits] tilghman: branch 1.8 r335655 - in /branches/1.8: configure configure.ac
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 13 13:52:42 CDT 2011
Author: tilghman
Date: Tue Sep 13 13:52:38 2011
New Revision: 335655
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=335655
Log:
Move mandatory checks closer to the beginning of the file.
If these are going to fail, they should fail as quickly as possible.
Modified:
branches/1.8/configure
branches/1.8/configure.ac
Modified: branches/1.8/configure.ac
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/configure.ac?view=diff&rev=335655&r1=335654&r2=335655
==============================================================================
--- branches/1.8/configure.ac (original)
+++ branches/1.8/configure.ac Tue Sep 13 13:52:38 2011
@@ -466,6 +466,49 @@
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])
@@ -1034,8 +1077,6 @@
AST_EXT_LIB_CHECK([ALSA], [asound], [snd_spcm_init], [alsa/asoundlib.h], [-lm -ldl])
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])
@@ -1670,28 +1711,6 @@
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
@@ -1706,8 +1725,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])
@@ -2017,10 +2034,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)
@@ -2086,20 +2099,6 @@
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)
More information about the asterisk-commits
mailing list