massive rework of configure script, and split of AST_EXT_LIB into separate macros, reducing code duplication

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2006-07-05 19:59:34 +00:00
parent 76f85726aa
commit d5b7bf2ab7
7 changed files with 14024 additions and 14348 deletions

View File

@@ -1,73 +1,83 @@
# AST_EXT_LIB([NAME], [FUNCTION], [package header], [package symbol name], [package friendly name], [additional LIB data]) # AST_EXT_LIB_SETUP([package symbol name], [package friendly name], [package option name], [additional help text])
AC_DEFUN([AST_EXT_LIB], AC_DEFUN([AST_EXT_LIB_SETUP],
[ [
AC_ARG_WITH([$1], AC_HELP_STRING([--with-$1=PATH],[use $5 files in PATH]),[ $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 case ${withval} in
n|no) n|no)
USE_$4=no USE_$1=no
;; ;;
y|ye|yes) y|ye|yes)
$4_MANDATORY="yes" $1_MANDATORY="yes"
;; ;;
*) *)
$4_DIR="${withval}" $1_DIR="${withval}"
$4_MANDATORY="yes" $1_MANDATORY="yes"
;; ;;
esac esac
]) ])
PBX_$1=0
AC_SUBST([$1_LIB])
AC_SUBST([$1_INCLUDE])
AC_SUBST([PBX_$1])
])
PBX_LIB$4=0 # AST_EXT_LIB_CHECK([package symbol name], [package library name], [function to check], [package header], [additional LIB data])
if test "${USE_$4}" != "no"; then AC_DEFUN([AST_EXT_LIB_CHECK],
[
if test "${USE_$1}" != "no"; then
pbxlibdir="" pbxlibdir=""
if test "x${$4_DIR}" != "x"; then if test "x${$1_DIR}" != "x"; then
pbxlibdir="-L${$1_DIR} -L${$1_DIR}/lib" if test -d ${$1_DIR}/lib; then
pbxlibdir="-L${$1_DIR}/lib"
else
pbxlibdir="-L${$1_DIR}"
fi
fi fi
AC_CHECK_LIB([$1], [$2], [AST_$4_FOUND=yes], [AST_$4_FOUND=no], ${pbxlibdir} $6) AC_CHECK_LIB([$2], [$3], [AST_$1_FOUND=yes], [AST_$1_FOUND=no], ${pbxlibdir} $5)
if test "${AST_$4_FOUND}" = "yes"; then if test "${AST_$1_FOUND}" = "yes"; then
$4_LIB="-l$1 $6" $1_LIB="-l$2 $5"
$4_HEADER_FOUND="1" $1_HEADER_FOUND="1"
if test "x${$4_DIR}" != "x"; then if test "x${$1_DIR}" != "x"; then
$4_LIB="${pbxlibdir} ${$4_LIB}" $1_LIB="${pbxlibdir} ${$1_LIB}"
$4_INCLUDE="-I${$4_DIR}/include" $1_INCLUDE="-I${$1_DIR}/include"
if test "x$3" != "x" ; then if test "x$4" != "x" ; then
AC_CHECK_HEADER([${$4_DIR}/include/$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] ) AC_CHECK_HEADER([${$1_DIR}/include/$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0] )
fi fi
else else
if test "x$3" != "x" ; then if test "x$4" != "x" ; then
AC_CHECK_HEADER([$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] ) AC_CHECK_HEADER([$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0] )
fi fi
fi fi
if test "x${$4_HEADER_FOUND}" = "x0" ; then if test "x${$1_HEADER_FOUND}" = "x0" ; then
if test ! -z "${$4_MANDATORY}" ; if test ! -z "${$1_MANDATORY}" ;
then then
echo " ***" echo " ***"
echo " *** It appears that you do not have the $1 development package installed." echo " *** It appears that you do not have the $2 development package installed."
echo " *** Please install it to include $5 support, or re-run configure" echo " *** Please install it to include ${$1_DESCRIP} support, or re-run configure"
echo " *** without explicitly specifying --with-$1" echo " *** without explicitly specifying --with-${$1_OPTION}"
exit 1 exit 1
fi fi
$4_LIB="" $1_LIB=""
$4_INCLUDE="" $1_INCLUDE=""
PBX_LIB$4=0 PBX_$1=0
else else
PBX_LIB$4=1 PBX_$1=1
AC_DEFINE_UNQUOTED([HAVE_$4], 1, [Define to indicate the $5 library]) AC_DEFINE_UNQUOTED([HAVE_$1], 1, [Define to indicate the ${$1_DESCRIP} library])
fi fi
elif test ! -z "${$4_MANDATORY}"; elif test ! -z "${$1_MANDATORY}";
then then
echo "***" echo "***"
echo "*** The $5 installation on this system appears to be broken." echo "*** The ${$1_DESCRIP} installation on this system appears to be broken."
echo "*** Either correct the installation, or run configure" echo "*** Either correct the installation, or run configure"
echo "*** without explicity specifying --with-$1" echo "*** without explicitly specifying --with-${$1_OPTION}"
exit 1 exit 1
fi fi
fi fi
AC_SUBST([$4_LIB])
AC_SUBST([$4_INCLUDE])
AC_SUBST([PBX_LIB$4])
]) ])

View File

@@ -52,6 +52,10 @@
<depend>unixodbc</depend> <depend>unixodbc</depend>
<defaultenabled>no</defaultenabled> <defaultenabled>no</defaultenabled>
</member> </member>
<member name="IMAP_STORAGE" displayname="Storage of Voicemail using IMAP4">
<depend>imap_tk</depend>
<defaultenabled>no</defaultenabled>
</member>
</category> </category>
***/ ***/

View File

@@ -1,30 +1,31 @@
ASOUND=@PBX_LIBALSA@ ASOUND=@PBX_ALSA@
CURL=@PBX_CURL@ CURL=@PBX_CURL@
FREETDS=@PBX_LIBFREETDS@ FREETDS=@PBX_FREETDS@
GTK=@PBX_GTK@ GTK=@PBX_GTK@
H323=@PBX_H323@ H323=@PBX_H323@
KDE=@PBX_KDE@ KDE=@PBX_KDE@
LIBNEWT=@PBX_LIBNEWT@ NEWT=@PBX_NEWT@
LIBOSPTK=@PBX_LIBOSPTK@ OSPTK=@PBX_OSPTK@
LIBPOPT=@PBX_LIBPOPT@ POPT=@PBX_POPT@
LIBPRI=@PBX_LIBLIBPRI@ PRI=@PBX_PRI@
LIBSPEEX=@PBX_LIBSPEEX@ SPEEX=@PBX_SPEEX@
LIBVORBIS=@PBX_LIBVORBIS@ VORBIS=@PBX_VORBIS@
NBS=@PBX_LIBNBS@ NBS=@PBX_NBS@
LIBOGG=@PBX_LIBOGG@ OGG=@PBX_OGG@
OSSAUDIO=@PBX_LIBOSS@ OSSAUDIO=@PBX_OSS@
PGSQL=@PBX_LIBpq@ PGSQL=@PBX_PGSQL@
QT=@PBX_QT@ QT=@PBX_QT@
RADIUSCLIENT=@PBX_LIBRADIUSCLIENT@ RADIUS=@PBX_RADIUS@
SQLITE=@PBX_LIBSQLITE@ SQLITE=@PBX_SQLITE@
SSL=@PBX_LIBOPENSSL@ SSL=@PBX_OPENSSL@
UNIXODBC=@PBX_LIBUNIXODBC@ UNIXODBC=@PBX_UNIXODBC@
VPBAPI=@PBX_LIBvpb@ VPBAPI=@PBX_VPB@
WIN32=@OSISWIN32@ WIN32=@OSISWIN32@
ZLIB=@PBX_LIBZLIB@ ZLIB=@PBX_ZLIB@
TONEZONE=@PBX_LIBTONEZONE@ TONEZONE=@PBX_TONEZONE@
ZAPTEL=@PBX_ZAPTEL@ ZAPTEL=@PBX_ZAPTEL@
LIBGSM=@PBX_LIBgsm@ GSM=@PBX_GSM@
IKSEMEL=@PBX_LIBIKSEMEL@ IKSEMEL=@PBX_IKSEMEL@
IXJUSER=@PBX_IXJUSER@ IXJUSER=@PBX_IXJUSER@
NETSNMP=@PBX_NETSNMP@ NETSNMP=@PBX_NETSNMP@
IMAP_TK=@PBX_IMAP_TK@

26950
configure vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -39,7 +39,7 @@
*/ */
#undef HAVE_ALLOCA_H #undef HAVE_ALLOCA_H
/* Define to indicate the Advanced Linux Sound Architecture library */ /* Define to indicate the ${ALSA_DESCRIP} library */
#undef HAVE_ALSA #undef HAVE_ALSA
/* Define to 1 if you have the <arpa/inet.h> header file. */ /* Define to 1 if you have the <arpa/inet.h> header file. */
@@ -60,7 +60,7 @@
/* Define if your system has the curl libraries. */ /* Define if your system has the curl libraries. */
#undef HAVE_CURL #undef HAVE_CURL
/* Define to indicate the curses library */ /* Define to indicate the ${CURSES_DESCRIP} library */
#undef HAVE_CURSES #undef HAVE_CURSES
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. /* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
@@ -85,7 +85,7 @@
/* Define to 1 if you have the `fork' function. */ /* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK #undef HAVE_FORK
/* Define to indicate the FreeTDS library */ /* Define to indicate the ${FREETDS_DESCRIP} library */
#undef HAVE_FREETDS #undef HAVE_FREETDS
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
@@ -118,7 +118,7 @@
/* Define if your system has the GTK libraries. */ /* Define if your system has the GTK libraries. */
#undef HAVE_GTK #undef HAVE_GTK
/* Define to indicate the Iksemel Jabber Library library */ /* Define to indicate the ${IKSEMEL_DESCRIP} library */
#undef HAVE_IKSEMEL #undef HAVE_IKSEMEL
/* Define to 1 if you have the `inet_ntoa' function. */ /* Define to 1 if you have the `inet_ntoa' function. */
@@ -133,21 +133,9 @@
/* Define to 1 if you have the <libintl.h> header file. */ /* Define to 1 if you have the <libintl.h> header file. */
#undef HAVE_LIBINTL_H #undef HAVE_LIBINTL_H
/* Define if your system has the KDE library */ /* Define if your system has the KDE libraries. */
#undef HAVE_LIBKDE #undef HAVE_LIBKDE
/* Define to indicate the ISDN PRI library */
#undef HAVE_LIBPRI
/* Define if your system has the pwlib libraries. */
#undef HAVE_LIBPWLIB
/* Define if your system has the Qt library */
#undef HAVE_LIBQT
/* Define if your system has the VoiceTronix (vpb) libraries. */
#undef HAVE_LIBVPB
/* Define to 1 if you have the <limits.h> header file. */ /* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H #undef HAVE_LIMITS_H
@@ -185,10 +173,10 @@
/* Define to 1 if you have the `munmap' function. */ /* Define to 1 if you have the `munmap' function. */
#undef HAVE_MUNMAP #undef HAVE_MUNMAP
/* Define to indicate the Network Broadcast Sound library */ /* Define to indicate the ${NBS_DESCRIP} library */
#undef HAVE_NBS #undef HAVE_NBS
/* Define to indicate the ncurses library */ /* Define to indicate the ${NCURSES_DESCRIP} library */
#undef HAVE_NCURSES #undef HAVE_NCURSES
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ /* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
@@ -203,32 +191,35 @@
/* Define to indicate the Net-SNMP library */ /* Define to indicate the Net-SNMP library */
#undef HAVE_NETSNMP #undef HAVE_NETSNMP
/* Define to indicate the newt library */ /* Define to indicate the ${NEWT_DESCRIP} library */
#undef HAVE_NEWT #undef HAVE_NEWT
/* Define to indicate the OGG library */ /* Define to indicate the ${OGG_DESCRIP} library */
#undef HAVE_OGG #undef HAVE_OGG
/* Define to indicate the OpenSSL library */ /* Define to indicate the ${OPENSSL_DESCRIP} library */
#undef HAVE_OPENSSL #undef HAVE_OPENSSL
/* Define to indicate the OSP Toolkit library */ /* Define to indicate the ${OSPTK_DESCRIP} library */
#undef HAVE_OSPTK #undef HAVE_OSPTK
/* Define to indicate the Open Sound System library */ /* Define to indicate the ${OSS_DESCRIP} library */
#undef HAVE_OSS #undef HAVE_OSS
/* Define to 1 if OSX atomic operations are supported. */ /* Define to 1 if OSX atomic operations are supported. */
#undef HAVE_OSX_ATOMICS #undef HAVE_OSX_ATOMICS
/* Define to indicate the popt library */ /* Define to indicate the PostgreSQL library */
#undef HAVE_PGSQL
/* Define to indicate the ${POPT_DESCRIP} library */
#undef HAVE_POPT #undef HAVE_POPT
/* Define to 1 if you have the `pow' function. */ /* Define to 1 if you have the `pow' function. */
#undef HAVE_POW #undef HAVE_POW
/* Define to indicate the PostgreSQL library */ /* Define to indicate the ${PRI_DESCRIP} library */
#undef HAVE_PQ #undef HAVE_PRI
/* Define to 1 if the system has the type `ptrdiff_t'. */ /* Define to 1 if the system has the type `ptrdiff_t'. */
#undef HAVE_PTRDIFF_T #undef HAVE_PTRDIFF_T
@@ -236,8 +227,14 @@
/* Define to 1 if you have the `putenv' function. */ /* Define to 1 if you have the `putenv' function. */
#undef HAVE_PUTENV #undef HAVE_PUTENV
/* Define to indicate the Radius Client library */ /* Define if your system has the pwlib libraries. */
#undef HAVE_RADIUSCLIENT #undef HAVE_PWLIB
/* Define if your system has the Qt library */
#undef HAVE_QT
/* Define to indicate the ${RADIUS_DESCRIP} library */
#undef HAVE_RADIUS
/* Define to 1 if your system has a GNU libc compatible `realloc' function, /* Define to 1 if your system has a GNU libc compatible `realloc' function,
and to 0 otherwise. */ and to 0 otherwise. */
@@ -261,10 +258,10 @@
/* Define to 1 if you have the `socket' function. */ /* Define to 1 if you have the `socket' function. */
#undef HAVE_SOCKET #undef HAVE_SOCKET
/* Define to indicate the Speex library */ /* Define to indicate the ${SPEEX_DESCRIP} library */
#undef HAVE_SPEEX #undef HAVE_SPEEX
/* Define to indicate the SQLite library */ /* Define to indicate the ${SQLITE_DESCRIP} library */
#undef HAVE_SQLITE #undef HAVE_SQLITE
/* Define to 1 if you have the `sqrt' function. */ /* Define to 1 if you have the `sqrt' function. */
@@ -385,22 +382,22 @@
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */ /* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H #undef HAVE_SYS_WAIT_H
/* Define to indicate the Termcap library */ /* Define to indicate the ${TERMCAP_DESCRIP} library */
#undef HAVE_TERMCAP #undef HAVE_TERMCAP
/* Define to 1 if you have the <termios.h> header file. */ /* Define to 1 if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H #undef HAVE_TERMIOS_H
/* Define to indicate the Term Info library */ /* Define to indicate the ${TINFO_DESCRIP} library */
#undef HAVE_TINFO #undef HAVE_TINFO
/* Define to indicate the tonezone library */ /* Define to indicate the ${TONEZONE_DESCRIP} library */
#undef HAVE_TONEZONE #undef HAVE_TONEZONE
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Define to indicate the unixODBC library */ /* Define to indicate the ${UNIXODBC_DESCRIP} library */
#undef HAVE_UNIXODBC #undef HAVE_UNIXODBC
/* Define to 1 if you have the `unsetenv' function. */ /* Define to 1 if you have the `unsetenv' function. */
@@ -424,9 +421,12 @@
/* Define to 1 if you have the <vfork.h> header file. */ /* Define to 1 if you have the <vfork.h> header file. */
#undef HAVE_VFORK_H #undef HAVE_VFORK_H
/* Define to indicate the Vorbis library */ /* Define to indicate the ${VORBIS_DESCRIP} library */
#undef HAVE_VORBIS #undef HAVE_VORBIS
/* Define if your system has the VoiceTronix API libraries. */
#undef HAVE_VPB
/* Define to 1 if you have the `vprintf' function. */ /* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF #undef HAVE_VPRINTF
@@ -439,7 +439,7 @@
/* Define if your system has the Zaptel headers. */ /* Define if your system has the Zaptel headers. */
#undef HAVE_ZAPTEL #undef HAVE_ZAPTEL
/* Define to indicate the zlib library */ /* Define to indicate the ${ZLIB_DESCRIP} library */
#undef HAVE_ZLIB #undef HAVE_ZLIB
/* Define to 1 if the system has the type `_Bool'. */ /* Define to 1 if the system has the type `_Bool'. */

View File

@@ -42,11 +42,11 @@ sysconfdir = @sysconfdir@
AST_DEVMODE=@AST_DEVMODE@ AST_DEVMODE=@AST_DEVMODE@
LIBOGG_LIB=@OGG_LIB@ OGG_LIB=@OGG_LIB@
LIBOGG_INCLUDE=@OGG_INCLUDE@ OGG_INCLUDE=@OGG_INCLUDE@
LIBVORBIS_LIB=@VORBIS_LIB@ VORBIS_LIB=@VORBIS_LIB@
LIBVORBIS_INCLUDE=@VORBIS_INCLUDE@ VORBIS_INCLUDE=@VORBIS_INCLUDE@
ASOUND_LIB=@ALSA_LIB@ ASOUND_LIB=@ALSA_LIB@
ASOUND_INCLUDE=@ALSA_INCLUDE@ ASOUND_INCLUDE=@ALSA_INCLUDE@
@@ -57,8 +57,8 @@ NBS_INCLUDE=@NBS_INCLUDE@
OSSAUDIO_LIB=@OSS_LIB@ OSSAUDIO_LIB=@OSS_LIB@
OSSAUDIO_INCLUDE=@OSS_INCLU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@gsm_INCLUDE@ GSM_INCLUDE=@GSM_INCLUDE@
CURSES_LIB=@CURSES_LIB@ CURSES_LIB=@CURSES_LIB@
CURSES_INCLUDE=@CURSES_INCLUDE@ CURSES_INCLUDE=@CURSES_INCLUDE@
@@ -127,7 +127,10 @@ NCURSES_INCLUDE=@NCURSES_INCLUDE@
EDITLINE_LIB=@EDITLINE_LIB@ EDITLINE_LIB=@EDITLINE_LIB@
RADIUSCLIENT_LIB=@RADIUSCLIENT_LIB@ RADIUS_LIB=@RADIUS_LIB@
RADIUSCLIENT_INCLUDE=@RADIUSCLIENT_INCLUDE@ RADIUS_INCLUDE=@RADIUS_INCLUDE@
NETSNMP_LIB=@NETSNMP_LIB@ NETSNMP_LIB=@NETSNMP_LIB@
IMAP_TK_LIB=@IMAP_TK_LIB@
IMAP_TK_INCLUDE=@IMAP_TK_INCLUDE@