massive rework of configure script, and split of AST_EXT_LIB into separate macros, reducing code duplication
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37066 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
29a8631c96
commit
135bedb7fe
86
acinclude.m4
86
acinclude.m4
|
@ -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
|
||||
n|no)
|
||||
USE_$4=no
|
||||
USE_$1=no
|
||||
;;
|
||||
y|ye|yes)
|
||||
$4_MANDATORY="yes"
|
||||
$1_MANDATORY="yes"
|
||||
;;
|
||||
*)
|
||||
$4_DIR="${withval}"
|
||||
$4_MANDATORY="yes"
|
||||
$1_DIR="${withval}"
|
||||
$1_MANDATORY="yes"
|
||||
;;
|
||||
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=""
|
||||
if test "x${$4_DIR}" != "x"; then
|
||||
pbxlibdir="-L${$1_DIR} -L${$1_DIR}/lib"
|
||||
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([$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
|
||||
$4_LIB="-l$1 $6"
|
||||
$4_HEADER_FOUND="1"
|
||||
if test "x${$4_DIR}" != "x"; then
|
||||
$4_LIB="${pbxlibdir} ${$4_LIB}"
|
||||
$4_INCLUDE="-I${$4_DIR}/include"
|
||||
if test "x$3" != "x" ; then
|
||||
AC_CHECK_HEADER([${$4_DIR}/include/$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
|
||||
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$3" != "x" ; then
|
||||
AC_CHECK_HEADER([$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
|
||||
if test "x$4" != "x" ; then
|
||||
AC_CHECK_HEADER([$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0] )
|
||||
fi
|
||||
fi
|
||||
if test "x${$4_HEADER_FOUND}" = "x0" ; then
|
||||
if test ! -z "${$4_MANDATORY}" ;
|
||||
if test "x${$1_HEADER_FOUND}" = "x0" ; then
|
||||
if test ! -z "${$1_MANDATORY}" ;
|
||||
then
|
||||
echo " ***"
|
||||
echo " *** It appears that you do not have the $1 development package installed."
|
||||
echo " *** Please install it to include $5 support, or re-run configure"
|
||||
echo " *** without explicitly specifying --with-$1"
|
||||
echo " *** It appears that you do not have the $2 development package installed."
|
||||
echo " *** Please install it to include ${$1_DESCRIP} support, or re-run configure"
|
||||
echo " *** without explicitly specifying --with-${$1_OPTION}"
|
||||
exit 1
|
||||
fi
|
||||
$4_LIB=""
|
||||
$4_INCLUDE=""
|
||||
PBX_LIB$4=0
|
||||
$1_LIB=""
|
||||
$1_INCLUDE=""
|
||||
PBX_$1=0
|
||||
else
|
||||
PBX_LIB$4=1
|
||||
AC_DEFINE_UNQUOTED([HAVE_$4], 1, [Define to indicate the $5 library])
|
||||
PBX_$1=1
|
||||
AC_DEFINE_UNQUOTED([HAVE_$1], 1, [Define to indicate the ${$1_DESCRIP} library])
|
||||
fi
|
||||
elif test ! -z "${$4_MANDATORY}";
|
||||
elif test ! -z "${$1_MANDATORY}";
|
||||
then
|
||||
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 "*** without explicity specifying --with-$1"
|
||||
echo "*** without explicitly specifying --with-${$1_OPTION}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([$4_LIB])
|
||||
AC_SUBST([$4_INCLUDE])
|
||||
AC_SUBST([PBX_LIB$4])
|
||||
])
|
||||
|
||||
|
||||
|
|
|
@ -52,6 +52,10 @@
|
|||
<depend>unixodbc</depend>
|
||||
<defaultenabled>no</defaultenabled>
|
||||
</member>
|
||||
<member name="IMAP_STORAGE" displayname="Storage of Voicemail using IMAP4">
|
||||
<depend>imap_tk</depend>
|
||||
<defaultenabled>no</defaultenabled>
|
||||
</member>
|
||||
</category>
|
||||
***/
|
||||
|
||||
|
|
|
@ -1,30 +1,31 @@
|
|||
ASOUND=@PBX_LIBALSA@
|
||||
ASOUND=@PBX_ALSA@
|
||||
CURL=@PBX_CURL@
|
||||
FREETDS=@PBX_LIBFREETDS@
|
||||
FREETDS=@PBX_FREETDS@
|
||||
GTK=@PBX_GTK@
|
||||
H323=@PBX_H323@
|
||||
KDE=@PBX_KDE@
|
||||
LIBNEWT=@PBX_LIBNEWT@
|
||||
LIBOSPTK=@PBX_LIBOSPTK@
|
||||
LIBPOPT=@PBX_LIBPOPT@
|
||||
LIBPRI=@PBX_LIBLIBPRI@
|
||||
LIBSPEEX=@PBX_LIBSPEEX@
|
||||
LIBVORBIS=@PBX_LIBVORBIS@
|
||||
NBS=@PBX_LIBNBS@
|
||||
LIBOGG=@PBX_LIBOGG@
|
||||
OSSAUDIO=@PBX_LIBOSS@
|
||||
PGSQL=@PBX_LIBpq@
|
||||
NEWT=@PBX_NEWT@
|
||||
OSPTK=@PBX_OSPTK@
|
||||
POPT=@PBX_POPT@
|
||||
PRI=@PBX_PRI@
|
||||
SPEEX=@PBX_SPEEX@
|
||||
VORBIS=@PBX_VORBIS@
|
||||
NBS=@PBX_NBS@
|
||||
OGG=@PBX_OGG@
|
||||
OSSAUDIO=@PBX_OSS@
|
||||
PGSQL=@PBX_PGSQL@
|
||||
QT=@PBX_QT@
|
||||
RADIUSCLIENT=@PBX_LIBRADIUSCLIENT@
|
||||
SQLITE=@PBX_LIBSQLITE@
|
||||
SSL=@PBX_LIBOPENSSL@
|
||||
UNIXODBC=@PBX_LIBUNIXODBC@
|
||||
VPBAPI=@PBX_LIBvpb@
|
||||
RADIUS=@PBX_RADIUS@
|
||||
SQLITE=@PBX_SQLITE@
|
||||
SSL=@PBX_OPENSSL@
|
||||
UNIXODBC=@PBX_UNIXODBC@
|
||||
VPBAPI=@PBX_VPB@
|
||||
WIN32=@OSISWIN32@
|
||||
ZLIB=@PBX_LIBZLIB@
|
||||
TONEZONE=@PBX_LIBTONEZONE@
|
||||
ZLIB=@PBX_ZLIB@
|
||||
TONEZONE=@PBX_TONEZONE@
|
||||
ZAPTEL=@PBX_ZAPTEL@
|
||||
LIBGSM=@PBX_LIBgsm@
|
||||
IKSEMEL=@PBX_LIBIKSEMEL@
|
||||
GSM=@PBX_GSM@
|
||||
IKSEMEL=@PBX_IKSEMEL@
|
||||
IXJUSER=@PBX_IXJUSER@
|
||||
NETSNMP=@PBX_NETSNMP@
|
||||
IMAP_TK=@PBX_IMAP_TK@
|
||||
|
|
1180
configure.ac
1180
configure.ac
File diff suppressed because it is too large
Load Diff
|
@ -39,7 +39,7 @@
|
|||
*/
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define to indicate the Advanced Linux Sound Architecture library */
|
||||
/* Define to indicate the ${ALSA_DESCRIP} library */
|
||||
#undef HAVE_ALSA
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
|
@ -60,7 +60,7 @@
|
|||
/* Define if your system has the curl libraries. */
|
||||
#undef HAVE_CURL
|
||||
|
||||
/* Define to indicate the curses library */
|
||||
/* Define to indicate the ${CURSES_DESCRIP} library */
|
||||
#undef HAVE_CURSES
|
||||
|
||||
/* 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. */
|
||||
#undef HAVE_FORK
|
||||
|
||||
/* Define to indicate the FreeTDS library */
|
||||
/* Define to indicate the ${FREETDS_DESCRIP} library */
|
||||
#undef HAVE_FREETDS
|
||||
|
||||
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
|
||||
|
@ -118,7 +118,7 @@
|
|||
/* Define if your system has the GTK libraries. */
|
||||
#undef HAVE_GTK
|
||||
|
||||
/* Define to indicate the Iksemel Jabber Library library */
|
||||
/* Define to indicate the ${IKSEMEL_DESCRIP} library */
|
||||
#undef HAVE_IKSEMEL
|
||||
|
||||
/* 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. */
|
||||
#undef HAVE_LIBINTL_H
|
||||
|
||||
/* Define if your system has the KDE library */
|
||||
/* Define if your system has the KDE libraries. */
|
||||
#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. */
|
||||
#undef HAVE_LIMITS_H
|
||||
|
||||
|
@ -185,10 +173,10 @@
|
|||
/* Define to 1 if you have the `munmap' function. */
|
||||
#undef HAVE_MUNMAP
|
||||
|
||||
/* Define to indicate the Network Broadcast Sound library */
|
||||
/* Define to indicate the ${NBS_DESCRIP} library */
|
||||
#undef HAVE_NBS
|
||||
|
||||
/* Define to indicate the ncurses library */
|
||||
/* Define to indicate the ${NCURSES_DESCRIP} library */
|
||||
#undef HAVE_NCURSES
|
||||
|
||||
/* 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 */
|
||||
#undef HAVE_NETSNMP
|
||||
|
||||
/* Define to indicate the newt library */
|
||||
/* Define to indicate the ${NEWT_DESCRIP} library */
|
||||
#undef HAVE_NEWT
|
||||
|
||||
/* Define to indicate the OGG library */
|
||||
/* Define to indicate the ${OGG_DESCRIP} library */
|
||||
#undef HAVE_OGG
|
||||
|
||||
/* Define to indicate the OpenSSL library */
|
||||
/* Define to indicate the ${OPENSSL_DESCRIP} library */
|
||||
#undef HAVE_OPENSSL
|
||||
|
||||
/* Define to indicate the OSP Toolkit library */
|
||||
/* Define to indicate the ${OSPTK_DESCRIP} library */
|
||||
#undef HAVE_OSPTK
|
||||
|
||||
/* Define to indicate the Open Sound System library */
|
||||
/* Define to indicate the ${OSS_DESCRIP} library */
|
||||
#undef HAVE_OSS
|
||||
|
||||
/* Define to 1 if OSX atomic operations are supported. */
|
||||
#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
|
||||
|
||||
/* Define to 1 if you have the `pow' function. */
|
||||
#undef HAVE_POW
|
||||
|
||||
/* Define to indicate the PostgreSQL library */
|
||||
#undef HAVE_PQ
|
||||
/* Define to indicate the ${PRI_DESCRIP} library */
|
||||
#undef HAVE_PRI
|
||||
|
||||
/* Define to 1 if the system has the type `ptrdiff_t'. */
|
||||
#undef HAVE_PTRDIFF_T
|
||||
|
@ -236,8 +227,14 @@
|
|||
/* Define to 1 if you have the `putenv' function. */
|
||||
#undef HAVE_PUTENV
|
||||
|
||||
/* Define to indicate the Radius Client library */
|
||||
#undef HAVE_RADIUSCLIENT
|
||||
/* Define if your system has the pwlib libraries. */
|
||||
#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,
|
||||
and to 0 otherwise. */
|
||||
|
@ -261,10 +258,10 @@
|
|||
/* Define to 1 if you have the `socket' function. */
|
||||
#undef HAVE_SOCKET
|
||||
|
||||
/* Define to indicate the Speex library */
|
||||
/* Define to indicate the ${SPEEX_DESCRIP} library */
|
||||
#undef HAVE_SPEEX
|
||||
|
||||
/* Define to indicate the SQLite library */
|
||||
/* Define to indicate the ${SQLITE_DESCRIP} library */
|
||||
#undef HAVE_SQLITE
|
||||
|
||||
/* 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. */
|
||||
#undef HAVE_SYS_WAIT_H
|
||||
|
||||
/* Define to indicate the Termcap library */
|
||||
/* Define to indicate the ${TERMCAP_DESCRIP} library */
|
||||
#undef HAVE_TERMCAP
|
||||
|
||||
/* Define to 1 if you have the <termios.h> header file. */
|
||||
#undef HAVE_TERMIOS_H
|
||||
|
||||
/* Define to indicate the Term Info library */
|
||||
/* Define to indicate the ${TINFO_DESCRIP} library */
|
||||
#undef HAVE_TINFO
|
||||
|
||||
/* Define to indicate the tonezone library */
|
||||
/* Define to indicate the ${TONEZONE_DESCRIP} library */
|
||||
#undef HAVE_TONEZONE
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to indicate the unixODBC library */
|
||||
/* Define to indicate the ${UNIXODBC_DESCRIP} library */
|
||||
#undef HAVE_UNIXODBC
|
||||
|
||||
/* Define to 1 if you have the `unsetenv' function. */
|
||||
|
@ -424,9 +421,12 @@
|
|||
/* Define to 1 if you have the <vfork.h> header file. */
|
||||
#undef HAVE_VFORK_H
|
||||
|
||||
/* Define to indicate the Vorbis library */
|
||||
/* Define to indicate the ${VORBIS_DESCRIP} library */
|
||||
#undef HAVE_VORBIS
|
||||
|
||||
/* Define if your system has the VoiceTronix API libraries. */
|
||||
#undef HAVE_VPB
|
||||
|
||||
/* Define to 1 if you have the `vprintf' function. */
|
||||
#undef HAVE_VPRINTF
|
||||
|
||||
|
@ -439,7 +439,7 @@
|
|||
/* Define if your system has the Zaptel headers. */
|
||||
#undef HAVE_ZAPTEL
|
||||
|
||||
/* Define to indicate the zlib library */
|
||||
/* Define to indicate the ${ZLIB_DESCRIP} library */
|
||||
#undef HAVE_ZLIB
|
||||
|
||||
/* Define to 1 if the system has the type `_Bool'. */
|
||||
|
|
35
makeopts.in
35
makeopts.in
|
@ -42,11 +42,11 @@ sysconfdir = @sysconfdir@
|
|||
|
||||
AST_DEVMODE=@AST_DEVMODE@
|
||||
|
||||
LIBOGG_LIB=@OGG_LIB@
|
||||
LIBOGG_INCLUDE=@OGG_INCLUDE@
|
||||
OGG_LIB=@OGG_LIB@
|
||||
OGG_INCLUDE=@OGG_INCLUDE@
|
||||
|
||||
LIBVORBIS_LIB=@VORBIS_LIB@
|
||||
LIBVORBIS_INCLUDE=@VORBIS_INCLUDE@
|
||||
VORBIS_LIB=@VORBIS_LIB@
|
||||
VORBIS_INCLUDE=@VORBIS_INCLUDE@
|
||||
|
||||
ASOUND_LIB=@ALSA_LIB@
|
||||
ASOUND_INCLUDE=@ALSA_INCLUDE@
|
||||
|
@ -57,8 +57,8 @@ NBS_INCLUDE=@NBS_INCLUDE@
|
|||
OSSAUDIO_LIB=@OSS_LIB@
|
||||
OSSAUDIO_INCLUDE=@OSS_INCLUDE@
|
||||
|
||||
LIBSPEEX_LIB=@SPEEX_LIB@
|
||||
LIBSPEEX_INCLUDE=@SPEEX_INCLUDE@
|
||||
SPEEX_LIB=@SPEEX_LIB@
|
||||
SPEEX_INCLUDE=@SPEEX_INCLUDE@
|
||||
|
||||
TONEZONE_LIB=@TONEZONE_LIB@
|
||||
TONEZONE_INCLUDE=@TONEZONE_INCLUDE@
|
||||
|
@ -68,17 +68,17 @@ ZAPTEL_INCLUDE=@ZAPTEL_INCLUDE@
|
|||
VPBAPI_LIB=@VPB_LIB@
|
||||
VPBAPI_INCLUDE=@VPB_INCLUDE@
|
||||
|
||||
LIBPRI_LIB=@LIBPRI_LIB@
|
||||
LIBPRI_INCLUDE=@LIBPRI_INCLUDE@
|
||||
PRI_LIB=@PRI_LIB@
|
||||
PRI_INCLUDE=@PRI_INCLUDE@
|
||||
|
||||
LIBOSPTK_LIB=@OSPTK_LIB@
|
||||
LIBOSPTK_INCLUDE=@OSPTK_INCLUDE@
|
||||
OSPTK_LIB=@OSPTK_LIB@
|
||||
OSPTK_INCLUDE=@OSPTK_INCLUDE@
|
||||
|
||||
UNIXODBC_LIB=@UNIXODBC_LIB@
|
||||
UNIXODBC_INCLUDE=@UNIXODBC_INCLUDE@
|
||||
|
||||
PGSQL_LIB=@pq_LIB@
|
||||
PGSQL_INCLUDE=@pq_INCLUDE@
|
||||
PGSQL_LIB=@PGSQL_LIB@
|
||||
PGSQL_INCLUDE=@PGSQL_INCLUDE@
|
||||
|
||||
SQLITE_LIB=@SQLITE_LIB@
|
||||
SQLITE_INCLUDE=@SQLITE_INCLUDE@
|
||||
|
@ -116,8 +116,8 @@ GTK_LIB=@GTK_LIB@
|
|||
|
||||
CURL_LIB=@CURLLIB@
|
||||
|
||||
LIBGSM_LIB=@gsm_LIB@
|
||||
LIBGSM_INCLUDE=@gsm_INCLUDE@
|
||||
GSM_LIB=@GSM_LIB@
|
||||
GSM_INCLUDE=@GSM_INCLUDE@
|
||||
|
||||
CURSES_LIB=@CURSES_LIB@
|
||||
CURSES_INCLUDE=@CURSES_INCLUDE@
|
||||
|
@ -127,7 +127,10 @@ NCURSES_INCLUDE=@NCURSES_INCLUDE@
|
|||
|
||||
EDITLINE_LIB=@EDITLINE_LIB@
|
||||
|
||||
RADIUSCLIENT_LIB=@RADIUSCLIENT_LIB@
|
||||
RADIUSCLIENT_INCLUDE=@RADIUSCLIENT_INCLUDE@
|
||||
RADIUS_LIB=@RADIUS_LIB@
|
||||
RADIUS_INCLUDE=@RADIUS_INCLUDE@
|
||||
|
||||
NETSNMP_LIB=@NETSNMP_LIB@
|
||||
|
||||
IMAP_TK_LIB=@IMAP_TK_LIB@
|
||||
IMAP_TK_INCLUDE=@IMAP_TK_INCLUDE@
|
||||
|
|
Reference in New Issue