Newer
Older
CFLAGS="${saved_cflags}"
AST_EXT_TOOL_CHECK([GMIME], [gmime-config], [], [], [#include <gmime/gmime.h>], [gboolean q = g_mime_check_version(0,0,0);])
if test "x${PBX_GMIME}" = "x0"; then
# Later versions of GMime use pkg-config
if test "x${PKGCONFIG}" = xNo; then :; else
GMIME_INCLUDE=$(${PKGCONFIG} gmime-2.0 --cflags 2>/dev/null)
GMIME_LIB=$(${PKGCONFIG} gmime-2.0 --libs)
if test "x${GMIME_INCLUDE}${GMIME_LIB}" = "x"; then
GMIME_INCLUDE=$(${PKGCONFIG} gmime-2.2 --cflags 2>/dev/null)
GMIME_LIB=$(${PKGCONFIG} gmime-2.2 --libs)
fi
if test "x${GMIME_INCLUDE}${GMIME_LIB}" != "x"; then
PBX_GMIME=1
AC_DEFINE([HAVE_GMIME], 1, [Define if your system has the GMIME libraries.])
fi
fi
fi
AST_EXT_LIB_CHECK([HOARD], [hoard], [malloc], [])
AST_EXT_LIB_CHECK([FREETDS], [sybdb], [dbinit], [sybdb.h])
Kevin P. Fleming
committed
AST_EXT_LIB_CHECK([TERMCAP], [termcap], [tgetent], [])
Kevin P. Fleming
committed
Kevin P. Fleming
committed
AST_EXT_LIB_CHECK([TINFO], [tinfo], [tgetent], [])
Tilghman Lesher
committed
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
Kevin P. Fleming
committed
tonezone_extra="-lm"
Kevin P. Fleming
committed
fi
Kevin P. Fleming
committed
AST_EXT_LIB_CHECK([TONEZONE], [tonezone], [tone_zone_find], [dahdi/tonezone.h], [${tonezone_extra} ${DAHDI_INCLUDE}])
Kevin P. Fleming
committed
AST_EXT_LIB_CHECK([USB], [usb], [usb_init], [usb.h], [])
if test "${OSARCH}" = "OpenBSD";
then
AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc -logg])
else
AST_EXT_LIB_CHECK([VORBIS], [vorbis], [vorbis_info_init], [vorbis/codec.h], [-lm -lvorbisenc])
fi
Kevin P. Fleming
committed
AC_LANG_PUSH(C++)
if test "${USE_VPB}" != "no"; then
AC_MSG_CHECKING(for vpb_open in -lvpb)
saved_libs="${LIBS}"
saved_cppflags="${CPPFLAGS}"
if test "x${VPB_DIR}" != "x"; then
if test -d ${VPB_DIR}/lib; then
vpblibdir=${VPB_DIR}/lib
else
vpblibdir=${VPB_DIR}
fi
LIBS="${LIBS} -L${vpblibdir}"
CPPFLAGS="${CPPFLAGS} -I${VPB_DIR}/include"
fi
Tilghman Lesher
committed
LIBS="${PTHREAD_LIBS} ${LIBS} -lvpb"
CPPFLAGS="${CPPFLAGS} ${PTHREAD_CFLAGS}"
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
AC_LINK_IFELSE(
[
AC_LANG_PROGRAM(
[#include <vpbapi.h>],
[int q = vpb_open(0,0);])
],
[ AC_MSG_RESULT(yes)
ac_cv_lib_vpb_vpb_open="yes"
],
[ AC_MSG_RESULT(no)
ac_cv_lib_vpb_vpb_open="no"
]
)
LIBS="${saved_libs}"
CPPFLAGS="${saved_cppflags}"
if test "${ac_cv_lib_vpb_vpb_open}" = "yes"; then
VPB_LIB="-lvpb"
if test "${VPB_DIR}" != ""; then
VPB_LIB="-L${vpblibdir} ${VPB_LIB}"
VPB_INCLUDE="-I${VPB_DIR}/include"
fi
PBX_VPB=1
AC_DEFINE([HAVE_VPB], 1, [Define if your system has the VoiceTronix API libraries.])
fi
fi
AC_LANG_POP
Kevin P. Fleming
committed
AST_EXT_LIB_CHECK([ZLIB], [z], [compress], [zlib.h])
Kevin P. Fleming
committed
Kevin P. Fleming
committed
if test "x$TERMCAP_LIB" != "x" ; then
EDITLINE_LIB="$TERMCAP_LIB"
Kevin P. Fleming
committed
elif test "x$TINFO_LIB" != "x" ; then
Kevin P. Fleming
committed
elif test "x$CURSES_LIB" != "x" ; then
Kevin P. Fleming
committed
elif test "x$NCURSES_LIB" != "x" ; then
EDITLINE_LIB="$NCURSES_LIB"
Kevin P. Fleming
committed
else
AC_MSG_ERROR([*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)])
Kevin P. Fleming
committed
fi
Kevin P. Fleming
committed
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)
AC_LINK_IFELSE(
AC_LANG_PROGRAM(
[#include <sql.h>
#include <sqlext.h>],
[int foo = SQL_WCHAR]),
AC_MSG_RESULT(yes)
AC_DEFINE([HAVE_ODBC_WCHAR], [1], [Define to 1 if your ODBC library has wide (Unicode) types.]),
AC_MSG_RESULT(no)
)
fi
Kevin P. Fleming
committed
AC_CHECK_HEADER([h323.h], [PBX_H323=1], [PBX_H323=0])
AC_SUBST(PBX_H323)
AC_CHECK_HEADER([linux/compiler.h],
[AC_DEFINE_UNQUOTED([HAVE_LINUX_COMPILER_H], 1, [Define to 1 if your system has linux/compiler.h.])])
Kevin P. Fleming
committed
AC_CHECK_HEADER([linux/ixjuser.h], [PBX_IXJUSER=1], [PBX_IXJUSER=0], [
#include <linux/version.h>
Kevin P. Fleming
committed
#include <linux/compiler.h>
#endif
])
AC_SUBST(PBX_IXJUSER)
Tilghman Lesher
committed
# Used in res/res_pktccops
AST_C_DEFINE_CHECK([MSG_NOSIGNAL], [MSG_NOSIGNAL], [sys/socket.h])
AST_C_DEFINE_CHECK([SO_NOSIGPIPE], [SO_NOSIGPIPE], [sys/socket.h])
AST_EXT_TOOL_CHECK([SDL], [sdl-config])
AST_EXT_LIB_CHECK([SDL_IMAGE], [SDL_image], [IMG_Load], [SDL_image.h], [${SDL_LIB}], [${SDL_INCLUDE}])
Tilghman Lesher
committed
AST_EXT_LIB_CHECK([FFMPEG], [avcodec], [sws_getContext], [ffmpeg/avcodec.h], [${PTHREAD_LIBS} -lz -lm], [${PTHREAD_CFLAGS}])
# possible places for video4linux version 1
AC_CHECK_HEADER([linux/videodev.h],
[AC_DEFINE_UNQUOTED([HAVE_VIDEODEV_H], 1, [Define to 1 if your system has linux/videodev.h.])])
# possible places for X11
AST_EXT_LIB_CHECK([X11], [X11], [XOpenDisplay], [X11/Xlib.h],,, [standard_path])
AST_EXT_LIB_CHECK([X11], [X11], [XOpenDisplay], [X11/Xlib.h],, [-I/usr/X11R6/include], [X11R6])
PBX_LAUNCHD=0
if test "${cross_compiling}" = "no";
then
AC_CHECK_FILE(/sbin/launchd, AC_DEFINE([HAVE_SBIN_LAUNCHD], 1, [Define to 1 if your system has /sbin/launchd.]))
PBX_LAUNCHD=1
AC_SUBST(PBX_LAUNCHD)
PBX_GTK2=0
if test ! "x${PKGCONFIG}" = xNo; then
GTK2_INCLUDE=$(${PKGCONFIG} gtk+-2.0 --cflags 2>/dev/null)
GTK2_LIB=$(${PKGCONFIG} gtk+-2.0 --libs)
PBX_GTK2=1
AC_DEFINE([HAVE_GTK2], 1, [Define if your system has the GTK2 libraries.])
fi
AC_SUBST(PBX_GTK2)
AC_SUBST(GTK2_INCLUDE)
AC_SUBST(GTK2_LIB)
Kevin P. Fleming
committed
# build a GENERIC_ODBC result based on the presence of either UnixODBC (preferred)
# or iODBC
PBX_GENERIC_ODBC=0
if test "${PBX_UNIXODBC}" = 1; then
PBX_GENERIC_ODBC=1
GENERIC_ODBC_LIB="${UNIXODBC_LIB}"
GENERIC_ODBC_INCLUDE="${UNIXODBC_INCLUDE}"
elif test "${PBX_IODBC}" = 1; then
PBX_GENERIC_ODBC=1
GENERIC_ODBC_LIB="${IODBC_LIB}"
GENERIC_ODBC_INCLUDE="${IODBC_INCLUDE}"
fi
AC_SUBST([GENERIC_ODBC_LIB])
AC_SUBST([GENERIC_ODBC_INCLUDE])
AC_SUBST([PBX_GENERIC_ODBC])
PBX_SYSLOG=0
if test "${ac_cv_header_syslog_h}" = "yes"; then
# syslog facilities
AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_AUTH], [LOG_AUTH], [syslog.h])
AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_AUTHPRIV], [LOG_AUTHPRIV], [syslog.h])
AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_CRON], [LOG_CRON], [syslog.h])
AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_DAEMON], [LOG_DAEMON], [syslog.h])
AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_FTP], [LOG_FTP], [syslog.h])
AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_KERN], [LOG_KERN], [syslog.h])
AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_LPR], [LOG_LPR], [syslog.h])
AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_MAIL], [LOG_MAIL], [syslog.h])
AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_NEWS], [LOG_NEWS], [syslog.h])
AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_SYSLOG], [LOG_SYSLOG], [syslog.h])
AST_C_DEFINE_CHECK([SYSLOG_FACILITY_LOG_UUCP], [LOG_UUCP], [syslog.h])
PBX_SYSLOG=1
AC_SUBST([PBX_SYSLOG])
${ac_cv_path_EGREP} 'CURSES|GTK2|OSARCH|NEWT' makeopts > makeopts.acbak
AC_CONFIG_FILES([build_tools/menuselect-deps makeopts channels/h323/Makefile])
AST_CHECK_MANDATORY
Kevin P. Fleming
committed
if test -f build_tools/menuselect-deps; then
# extract old values of all PBX_ variables from menuselect-deps
# and preserve them so that menuselect can determine whether
# any previously-met dependencies are no longer met and warn
# the user appropriately
while IFS="=:" read var val old_val; do
eval "PBX_${var}=\${PBX_${var}}:${val}"
done < build_tools/menuselect-deps
fi
Kevin P. Fleming
committed
AC_OUTPUT
${ac_cv_path_EGREP} 'CURSES|GTK2|OSARCH|NEWT' makeopts > makeopts.acbak2
if test "x${ac_cv_path_CMP}" = "x:"; then
( cd `pwd`/menuselect && ./configure )
else if ${ac_cv_path_CMP} -s makeopts.acbak makeopts.acbak2; then : ; else
( cd `pwd`/menuselect && ./configure )
rm makeopts.acbak makeopts.acbak2
Kevin P. Fleming
committed
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
echo
echo " .\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$=.. "
echo " .\$7\$7.. .7\$\$7:. "
echo " .\$\$:. ,\$7.7 "
echo " .\$7. 7\$\$\$\$ .\$\$77 "
echo " ..\$\$. \$\$\$\$\$ .\$\$\$7 "
echo " ..7\$ .?. \$\$\$\$\$ .?. 7\$\$\$."
echo " \$.\$. .\$\$\$7. \$\$\$\$7 .7\$\$\$. .\$\$\$."
echo " .777. .\$\$\$\$\$\$77\$\$\$77\$\$\$\$\$7. \$\$\$,"
echo " \$\$\$~ .7\$\$\$\$\$\$\$\$\$\$\$\$\$7. .\$\$\$."
echo ".\$\$7 .7\$\$\$\$\$\$\$7: ?\$\$\$."
echo "\$\$\$ ?7\$\$\$\$\$\$\$\$\$\$I .\$\$\$7 "
echo "\$\$\$ .7\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$ :\$\$\$. "
echo "\$\$\$ \$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$\$\$\$ .\$\$\$. "
echo "\$\$\$ \$\$\$ 7\$\$\$7 .\$\$\$ .\$\$\$. "
echo "\$\$\$\$ \$\$\$\$7 .\$\$\$. "
echo "7\$\$\$7 7\$\$\$\$ 7\$\$\$ "
echo " \$\$\$\$\$ \$\$\$ "
echo " \$\$\$\$7. \$\$ (TM) "
echo " \$\$\$\$\$\$\$. .7\$\$\$\$\$\$ \$\$ "
echo " \$\$\$\$\$\$\$\$\$\$\$\$7\$\$\$\$\$\$\$\$\$.\$\$\$\$\$\$ "
echo " \$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$. "
echo
Kevin P. Fleming
committed
AC_MSG_NOTICE( OS type : $host_os)
AC_MSG_NOTICE( build-cpu:vendor:os: $build_cpu : $build_vendor : $build_os :)
AC_MSG_NOTICE( host-cpu:vendor:os: $host_cpu : $host_vendor : $host_os :)
if test "${cross_compiling}" = "yes"; then