551 lines
16 KiB
Text
551 lines
16 KiB
Text
# Process this file with autoconf to produce a configure script.
|
|
AC_INIT(YATE, 0.8.6)
|
|
AC_CONFIG_SRCDIR([README])
|
|
AC_PREREQ(2.52)
|
|
|
|
PACKAGE_VERSION_MAJOR="${PACKAGE_VERSION%%.*}"
|
|
PACKAGE_VERSION_MINOR="${PACKAGE_VERSION#*.}"
|
|
PACKAGE_VERSION_MINOR="${PACKAGE_VERSION_MINOR%.*}"
|
|
PACKAGE_VERSION_BUILD="${PACKAGE_VERSION##*.}"
|
|
AC_SUBST(PACKAGE_VERSION_MAJOR)
|
|
AC_SUBST(PACKAGE_VERSION_MINOR)
|
|
AC_SUBST(PACKAGE_VERSION_BUILD)
|
|
|
|
# Checks for programs.
|
|
AC_PROG_CXX
|
|
AC_PROG_CC
|
|
AC_PROG_AWK
|
|
|
|
# Check if gcc style printf argument check is supported
|
|
HAVE_GCC_FORMAT_CHECK=""
|
|
AC_MSG_CHECKING([for gcc printf format typechecks])
|
|
SAVE_CFLAGS="$CFLAGS"
|
|
CFLAGS="$CFLAGS -Wall -Werror"
|
|
AC_TRY_COMPILE([],[void f(void*x,const char*f,...) __attribute__((format(printf,2,3))); ],[ac_cv_format_checks=yes],[ac_cv_format_checks=no])
|
|
CFLAGS="$SAVE_CFLAGS"
|
|
if [[ "x$ac_cv_format_checks" = "xyes" ]]; then
|
|
HAVE_GCC_FORMAT_CHECK="-DHAVE_GCC_FORMAT_CHECK"
|
|
fi
|
|
AC_MSG_RESULT([$ac_cv_format_checks])
|
|
|
|
# Checks for header files.
|
|
AC_HEADER_DIRENT
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS([fcntl.h arpa/inet.h netdb.h netinet/in.h sys/ioctl.h sys/socket.h sys/time.h], , [AC_MSG_ERROR([This header file is required.])])
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
AC_C_CONST
|
|
AC_C_INLINE
|
|
AC_HEADER_TIME
|
|
|
|
# Checks for library functions.
|
|
AC_FUNC_MALLOC
|
|
AC_TYPE_SIGNAL
|
|
AC_CHECK_FUNCS([gettimeofday inet_ntoa memmove regcomp strerror], , [AC_MSG_ERROR([This function is required.])])
|
|
|
|
AC_CACHE_SAVE
|
|
|
|
# Checks for required libraries.
|
|
AC_CHECK_LIB([dl], [dlopen], , [AC_MSG_ERROR([This library is required.])])
|
|
AC_CHECK_LIB([pthread], [pthread_mutexattr_settype], , [AC_MSG_ERROR([This library is required.])])
|
|
|
|
MUTEX_HACK=""
|
|
AC_MSG_CHECKING([for pthread_mutexattr_settype declaration])
|
|
AC_LANG_SAVE
|
|
AC_LANG_C
|
|
SAVE_CFLAGS="$CFLAGS"
|
|
CFLAGS="$CFLAGS -Wall -Werror"
|
|
AC_TRY_COMPILE([
|
|
#include <unistd.h>
|
|
#include <pthread.h>
|
|
],[
|
|
pthread_mutexattr_t attr;
|
|
pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE_NP);
|
|
],
|
|
have_mutex_settype="yes",
|
|
have_mutex_settype="no"
|
|
)
|
|
CFLAGS="$SAVE_CFLAGS"
|
|
AC_LANG_RESTORE
|
|
if [[ "$have_mutex_settype" = "no" ]]; then
|
|
MUTEX_HACK="-DMUTEX_HACK"
|
|
fi
|
|
AC_MSG_RESULT([$have_mutex_settype])
|
|
AC_SUBST(MUTEX_HACK)
|
|
|
|
THREAD_KILL=""
|
|
AC_MSG_CHECKING([for pthread_kill_other_threads_np declaration])
|
|
AC_LANG_SAVE
|
|
AC_LANG_C
|
|
SAVE_CFLAGS="$CFLAGS"
|
|
CFLAGS="$CFLAGS -Wall -Werror"
|
|
AC_TRY_COMPILE([
|
|
#include <unistd.h>
|
|
#include <pthread.h>
|
|
],[
|
|
pthread_kill_other_threads_np();
|
|
],
|
|
have_pthread_kill="yes",
|
|
have_pthread_kill="no"
|
|
)
|
|
CFLAGS="$SAVE_CFLAGS"
|
|
AC_LANG_RESTORE
|
|
if [[ "$have_pthread_kill" = "yes" ]]; then
|
|
THREAD_KILL="-DTHREAD_KILL"
|
|
fi
|
|
AC_MSG_RESULT([$have_pthread_kill])
|
|
AC_SUBST(THREAD_KILL)
|
|
|
|
# Check for compile options
|
|
INLINE_FLAGS=""
|
|
AC_ARG_ENABLE(inline,AC_HELP_STRING([--enable-inline],[Enable inlining of functions]),want_inline=$enableval,want_inline=auto)
|
|
AC_MSG_CHECKING([whether to use inline functions])
|
|
case "x$want_inline" in
|
|
xyes)
|
|
INLINE_FLAGS="-finline -Winline"
|
|
;;
|
|
xno)
|
|
INLINE_FLAGS="-fno-inline"
|
|
;;
|
|
xauto)
|
|
;;
|
|
*)
|
|
AC_ERROR([Invalid argument passed to --enable-inline])
|
|
;;
|
|
esac
|
|
AC_MSG_RESULT([$want_inline])
|
|
AC_SUBST(INLINE_FLAGS)
|
|
|
|
# Checks for optional libraries.
|
|
|
|
HAVE_PGSQL=no
|
|
PGSQL_INC=""
|
|
AC_ARG_WITH(libpq,AC_HELP_STRING([--with-libpq=DIR],[use Postgress SQL from DIR (default /usr)]),[ac_cv_use_libpq=$withval],[ac_cv_use_libpq=/usr])
|
|
if [[ "x$ac_cv_use_libpq" != "xno" ]]; then
|
|
AC_MSG_CHECKING([for Postgress SQL in $ac_cv_use_libpq])
|
|
libpq="$ac_cv_use_libpq/lib/libpq.so"
|
|
for i in include include/pgsql pgsql/include include/postgresql; do
|
|
incpq="$ac_cv_use_libpq/$i"
|
|
test -f "$incpq/libpq-fe.h" && break
|
|
done
|
|
if [[ ! -f "$incpq/libpq-fe.h" ]]; then
|
|
incpq="$incpq/pgsql"
|
|
fi
|
|
if [[ -f "$incpq/libpq-fe.h" -a -f "$libpq" ]]; then
|
|
HAVE_PGSQL=yes
|
|
PGSQL_INC="-I$incpq"
|
|
fi
|
|
AC_MSG_RESULT([$HAVE_PGSQL])
|
|
fi
|
|
AC_SUBST(HAVE_PGSQL)
|
|
AC_SUBST(PGSQL_INC)
|
|
|
|
HAVE_PRI=no
|
|
AC_ARG_WITH(libpri,AC_HELP_STRING([--with-libpri],[use ISDN PRI if available (default)]),[ac_cv_use_libpri=$withval],[ac_cv_use_libpri=yes])
|
|
if [[ "x$ac_cv_use_libpri" != "xno" ]]; then
|
|
AC_CHECK_HEADER(libpri.h, , [ac_cv_use_libpri=no])
|
|
fi
|
|
if [[ "x$ac_cv_use_libpri" != "xno" ]]; then
|
|
AC_CHECK_LIB([pri], [pri_new], [HAVE_PRI=yes])
|
|
fi
|
|
AC_SUBST(HAVE_PRI)
|
|
|
|
HAVE_GSM=no
|
|
AC_ARG_WITH(libgsm,AC_HELP_STRING([--with-libgsm],[use GSM codec if available (default)]),[ac_cv_use_libgsm=$withval],[ac_cv_use_libgsm=yes])
|
|
if [[ "x$ac_cv_use_libgsm" != "xno" ]]; then
|
|
AC_CHECK_HEADER(gsm.h, , [ac_cv_use_libgsm=no])
|
|
fi
|
|
if [[ "x$ac_cv_use_libgsm" != "xno" ]]; then
|
|
AC_CHECK_LIB([gsm], [gsm_create], [HAVE_GSM=yes])
|
|
fi
|
|
AC_SUBST(HAVE_GSM)
|
|
|
|
HAVE_PWLIB=no
|
|
PWLIB_RTTI=none
|
|
PWLIB_INC=""
|
|
PWLIB_LIB=""
|
|
PWLIB_RUN=""
|
|
AC_ARG_WITH(pwlib,AC_HELP_STRING([--with-pwlib=DIR],[use Pwlib from DIR (default /usr)]),[ac_cv_use_pwlib=$withval],[ac_cv_use_pwlib=/usr])
|
|
|
|
if [[ "x$ac_cv_use_pwlib" != "xno" ]]; then
|
|
AC_MSG_CHECKING([for Pwlib in $ac_cv_use_pwlib])
|
|
verpw=`ptlib-config --version 2>/dev/null`
|
|
prtti=`ptlib-config --ccflags 2>/dev/null | sed -n 's/^.*\(-f[[^ ]]*rtti\).*$/\1/p'`
|
|
# try first installed directory
|
|
incpw="$ac_cv_use_pwlib/include/ptlib.h"
|
|
libpw="$ac_cv_use_pwlib/lib/libpt.so"
|
|
PWLIB_INC="-I$ac_cv_use_pwlib/include/ptlib"
|
|
if [[ "$verpw" '<' "1.6.0" ]]; then
|
|
PWLIB_INC="-I$ac_cv_use_pwlib/include/ptlib/unix/ptlib -I$ac_cv_use_pwlib/include/ptlib/unix $PWLIB_INC"
|
|
fi
|
|
if [[ -f "$incpw" -a -f "$libpw" ]]; then
|
|
HAVE_PWLIB=installed
|
|
PWLIB_LIB="-L$ac_cv_use_pwlib/lib -lpt"
|
|
case "x$prtti" in
|
|
x-frtti)
|
|
PWLIB_RTTI=yes
|
|
;;
|
|
x-fno-rtti)
|
|
PWLIB_RTTI=no
|
|
;;
|
|
esac
|
|
else
|
|
# try source directory style
|
|
libpw=`echo "$ac_cv_use_pwlib/lib/"libpt*r.so`
|
|
if [[ -f "$incpw" -a -f "$libpw" ]]; then
|
|
prtti=`"$ac_cv_use_pwlib/make/ptlib-config" --ccflags 2>/dev/null | sed -n 's/^.*\(-f[[^ ]]*rtti\).*$/\1/p'`
|
|
HAVE_PWLIB=sources
|
|
PWLIB_LIB="-L$ac_cv_use_pwlib/lib -l`echo "$libpw"|sed 's,^.*/lib,,; s,\.so$,,'`"
|
|
PWLIB_RUN=":$ac_cv_use_pwlib/lib"
|
|
case "x$prtti" in
|
|
x-frtti)
|
|
PWLIB_RTTI=yes
|
|
;;
|
|
x-fno-rtti)
|
|
PWLIB_RTTI=no
|
|
;;
|
|
esac
|
|
fi
|
|
fi
|
|
AC_MSG_RESULT([$HAVE_PWLIB $verpw RTTI: $PWLIB_RTTI])
|
|
fi
|
|
|
|
HAVE_H323=no
|
|
H323_INC=""
|
|
H323_LIB=""
|
|
H323_RUN=""
|
|
AC_ARG_WITH(openh323,AC_HELP_STRING([--with-openh323=DIR],[use OpenH323 from DIR (default /usr)]),[ac_cv_use_openh323=$withval],[ac_cv_use_openh323=/usr])
|
|
|
|
if [[ "x$HAVE_PWLIB" != "xno" -a "x$ac_cv_use_openh323" != "xno" ]]; then
|
|
AC_MSG_CHECKING([for OpenH323 in $ac_cv_use_openh323])
|
|
# try first installed directory
|
|
inc323="$ac_cv_use_openh323/include/openh323/h323.h"
|
|
lib323="$ac_cv_use_openh323/lib/libopenh323.so"
|
|
if [[ -f "$inc323" -a -f "$lib323" ]]; then
|
|
HAVE_H323=installed
|
|
H323_INC="-I$ac_cv_use_openh323/include/openh323"
|
|
H323_LIB="-L$ac_cv_use_openh323/lib -lopenh323"
|
|
else
|
|
# try source directory style
|
|
inc323="$ac_cv_use_openh323/include/h323.h"
|
|
lib323=`echo "$ac_cv_use_openh323/lib/"libh323*r.so`
|
|
if [[ -f "$inc323" -a -f "$lib323" ]]; then
|
|
HAVE_H323=sources
|
|
H323_INC="-I$ac_cv_use_openh323/include"
|
|
H323_LIB="-L$ac_cv_use_openh323/lib -l`echo "$lib323"|sed 's,^.*/lib,,; s,\.so$,,'`"
|
|
H323_RUN=":$ac_cv_use_openh323/lib"
|
|
fi
|
|
fi
|
|
AC_MSG_RESULT([$HAVE_H323])
|
|
fi
|
|
|
|
if [[ "x$HAVE_H323" != "xno" ]]; then
|
|
H323_INC="$PWLIB_INC $H323_INC"
|
|
H323_LIB="$PWLIB_LIB $H323_LIB"
|
|
H323_RUN="$PWLIB_RUN$H323_RUN"
|
|
fi
|
|
AC_SUBST(HAVE_H323)
|
|
AC_SUBST(H323_INC)
|
|
AC_SUBST(H323_LIB)
|
|
AC_SUBST(H323_RUN)
|
|
|
|
HAVE_ORTP=no
|
|
ORTP_INC=""
|
|
ORTP_LIB=""
|
|
AC_ARG_WITH(libortp,AC_HELP_STRING([--with-libortp=DIR],[use oRTP from DIR (default /usr)]),[ac_cv_use_libortp=$withval],[ac_cv_use_libortp=/usr])
|
|
if [[ "x$ac_cv_use_libortp" != "xno" ]]; then
|
|
AC_MSG_CHECKING([for oRTP in $ac_cv_use_libortp])
|
|
incor="$ac_cv_use_libortp/include/ortp"
|
|
libor="$ac_cv_use_libortp/lib/libortp.so"
|
|
if [[ -f "$incor/ortp.h" -a -f "$libor" ]]; then
|
|
HAVE_ORTP=yes
|
|
ORTP_INC="-I$incor"
|
|
ORTP_LIB="-L$ac_cv_use_libortp/lib -lortp"
|
|
fi
|
|
AC_MSG_RESULT([$HAVE_ORTP])
|
|
fi
|
|
AC_SUBST(HAVE_ORTP)
|
|
AC_SUBST(ORTP_INC)
|
|
AC_SUBST(ORTP_LIB)
|
|
|
|
HAVE_EXOSIP=no
|
|
EXOSIP_INC=""
|
|
EXOSIP_LIB=""
|
|
AC_ARG_WITH(libexosip,AC_HELP_STRING([--with-libexosip=DIR],[use eXosip from DIR (default /usr)]),[ac_cv_use_libexosip=$withval],[ac_cv_use_libexosip=/usr])
|
|
if [[ "x$ac_cv_use_libexosip" != "xno" ]]; then
|
|
AC_MSG_CHECKING([for eXosip in $ac_cv_use_libexosip])
|
|
incexo="$ac_cv_use_libexosip/include/eXosip"
|
|
libexo="$ac_cv_use_libexosip/lib/libeXosip.so"
|
|
if [[ -f "$incexo/eXosip.h" -a -f "$libexo" ]]; then
|
|
HAVE_EXOSIP=yes
|
|
EXOSIP_INC="-I$incexo"
|
|
EXOSIP_LIB="-L$ac_cv_use_libexosip/lib -leXosip"
|
|
fi
|
|
AC_MSG_RESULT([$HAVE_EXOSIP])
|
|
fi
|
|
AC_SUBST(HAVE_EXOSIP)
|
|
AC_SUBST(EXOSIP_INC)
|
|
AC_SUBST(EXOSIP_LIB)
|
|
|
|
HAVE_GLIB1=no
|
|
GLIB1_INC=""
|
|
GLIB1_LIB=""
|
|
AC_ARG_WITH(libglib,AC_HELP_STRING([--with-libglib=DIR],[use Glib 1.2 from DIR (default /usr)]),[ac_cv_use_libglib=$withval],[ac_cv_use_libglib=yes])
|
|
if [[ "x$ac_cv_use_libglib" = "xyes" ]]; then
|
|
AC_MSG_CHECKING([for Glib 1.2 using pkg-config])
|
|
verg=`pkg-config --modversion glib 2>/dev/null`
|
|
incg=`pkg-config --cflags-only-I glib 2>/dev/null`
|
|
libg=`pkg-config --libs glib 2>/dev/null`
|
|
if [[ "x$incg" != "x" -a "x$libg" != "x" ]]; then
|
|
HAVE_GLIB1=yes
|
|
GLIB1_INC="$incg"
|
|
GLIB1_LIB="$libg"
|
|
ac_cv_use_libglib="no"
|
|
else
|
|
ac_cv_use_libglib="/usr"
|
|
verg="no"
|
|
fi
|
|
AC_MSG_RESULT([$verg])
|
|
fi
|
|
if [[ "x$ac_cv_use_libglib" != "xno" ]]; then
|
|
AC_MSG_CHECKING([for Glib 1.2 in $ac_cv_use_libglib])
|
|
incg="$ac_cv_use_libglib"
|
|
libg="$ac_cv_use_libglib/lib"
|
|
if [[ -f "$incg/include/glib-1.2/glib.h" -a -f "$libg2/libglib-1.2.so" ]]; then
|
|
HAVE_GLIB1=yes
|
|
GLIB1_INC="-I$incg/include/glib-1.2 -I$libg/glib-1.2/include"
|
|
GLIB1_LIB="-L$libg -lglib-1.2"
|
|
fi
|
|
AC_MSG_RESULT([$HAVE_GLIB1])
|
|
fi
|
|
AC_SUBST(HAVE_GLIB1)
|
|
AC_SUBST(GLIB1_INC)
|
|
AC_SUBST(GLIB1_LIB)
|
|
|
|
HAVE_GLIB="$HAVE_GLIB1"
|
|
GLIB_INC="$GLIB1_INC"
|
|
GLIB_LIB="$GLIB1_LIB"
|
|
|
|
HAVE_GLIB2=no
|
|
GLIB2_INC=""
|
|
GLIB2_LIB=""
|
|
AC_ARG_WITH(libglib2,AC_HELP_STRING([--with-libglib2=DIR],[use Glib 2.0 from DIR (default /usr)]),[ac_cv_use_libglib2=$withval],[ac_cv_use_libglib2=yes])
|
|
if [[ "x$ac_cv_use_libglib2" = "xyes" ]]; then
|
|
AC_MSG_CHECKING([for Glib 2.0 using pkg-config])
|
|
verg2=`pkg-config --modversion glib-2.0 2>/dev/null`
|
|
incg2=`pkg-config --cflags-only-I glib-2.0 2>/dev/null`
|
|
libg2=`pkg-config --libs glib-2.0 2>/dev/null`
|
|
if [[ "x$incg2" != "x" -a "x$libg2" != "x" ]]; then
|
|
HAVE_GLIB2=yes
|
|
GLIB2_INC="$incg2"
|
|
GLIB2_LIB="$libg2"
|
|
ac_cv_use_libglib2="no"
|
|
HAVE_GLIB=yes
|
|
GLIB_INC="$GLIB2_INC"
|
|
GLIB_LIB="$GLIB2_LIB"
|
|
else
|
|
ac_cv_use_libglib2="/usr"
|
|
verg2="no"
|
|
fi
|
|
AC_MSG_RESULT([$verg2])
|
|
fi
|
|
if [[ "x$ac_cv_use_libglib2" != "xno" ]]; then
|
|
AC_MSG_CHECKING([for Glib 2.0 in $ac_cv_use_libglib2])
|
|
incg2="$ac_cv_use_libglib2"
|
|
libg2="$ac_cv_use_libglib2/lib"
|
|
if [[ -f "$incg2/include/glib-2.0/glib.h" -a -f "$libg2/libglib-2.0.so" ]]; then
|
|
HAVE_GLIB2=yes
|
|
GLIB2_INC="-I$incg2/include/glib-2.0 -I$libg2/glib-2.0/include"
|
|
GLIB2_LIB="-L$libg2 -lglib-2.0"
|
|
HAVE_GLIB=yes
|
|
GLIB_INC="$GLIB2_INC"
|
|
GLIB_LIB="$GLIB2_LIB"
|
|
fi
|
|
AC_MSG_RESULT([$HAVE_GLIB2])
|
|
fi
|
|
AC_SUBST(HAVE_GLIB2)
|
|
AC_SUBST(GLIB2_INC)
|
|
AC_SUBST(GLIB2_LIB)
|
|
|
|
AC_SUBST(HAVE_GLIB)
|
|
AC_SUBST(GLIB_INC)
|
|
AC_SUBST(GLIB_LIB)
|
|
|
|
HAVE_IAX2=no
|
|
IAX2_INC=""
|
|
IAX2_LIB=""
|
|
IAX2_DEP=""
|
|
AC_ARG_WITH(libIAX2,AC_HELP_STRING([--with-libiax2=DIR],[use IAX 2 from DIR (default: included)]),[ac_cv_use_libiax2=$withval],[ac_cv_use_libiax2=included])
|
|
if [[ "x$ac_cv_use_libiax2" = "xincluded" ]]; then
|
|
ac_cv_use_libiax2="no"
|
|
basedir=`cd "$srcdir" && pwd`
|
|
AC_MSG_CHECKING([for IAX 2 in contrib])
|
|
inci2="contrib/iax"
|
|
if [[ -f "$basedir/$inci2/iax2.h" ]]; then
|
|
HAVE_IAX2=yes
|
|
IAX2_INC="-I$basedir/$inci2"
|
|
IAX2_DEP="../$inci2/libiax.a"
|
|
fi
|
|
AC_MSG_RESULT([$HAVE_IAX2])
|
|
fi
|
|
if [[ "x$ac_cv_use_libiax2" = "xyes" ]]; then
|
|
AC_MSG_CHECKING([for IAX 2 using iax-config])
|
|
veri2=`iax-config --version 2>/dev/null`
|
|
inci2=`iax-config --cflags 2>/dev/null`
|
|
libi2=`iax-config --libs 2>/dev/null`
|
|
if [[ "x$inci2" != "x" -a "x$libi2" != "x" ]]; then
|
|
HAVE_IAX2=yes
|
|
IAX2_INC="$inci2"
|
|
IAX2_LIB="$libi2"
|
|
ac_cv_use_libiax2="no"
|
|
else
|
|
ac_cv_use_libiax2="/usr"
|
|
verg2="no"
|
|
fi
|
|
AC_MSG_RESULT([$veri2])
|
|
fi
|
|
if [[ "x$ac_cv_use_libiax2" != "xno" ]]; then
|
|
AC_MSG_CHECKING([for IAX 2 in $ac_cv_use_libiax2])
|
|
inci2="$ac_cv_use_libiax2"
|
|
libi2="$ac_cv_use_libiax2/lib"
|
|
if [[ -f "$inci2/include/iax/iax2.h" -a -f "$libi2/libiax.so" ]]; then
|
|
HAVE_IAX2=yes
|
|
IAX2_INC="-I$inci2/include/iax"
|
|
IAX2_LIB="-L$libi2 -liax"
|
|
fi
|
|
AC_MSG_RESULT([$HAVE_IAX2])
|
|
fi
|
|
AC_SUBST(HAVE_IAX2)
|
|
AC_SUBST(IAX2_INC)
|
|
AC_SUBST(IAX2_LIB)
|
|
AC_SUBST(IAX2_DEP)
|
|
|
|
HAVE_SPANDSP=no
|
|
SPANDSP_INC=""
|
|
SPANDSP_LIB=""
|
|
AC_ARG_WITH(spandsp,AC_HELP_STRING([--with-spandsp=DIR],[use spandsp from DIR (default /usr)]),[ac_cv_use_spandsp=$withval],[ac_cv_use_spandsp=/usr])
|
|
if [[ "x$ac_cv_use_spandsp" != "xno" ]]; then
|
|
AC_MSG_CHECKING([for spandsp in $ac_cv_use_spandsp])
|
|
incdsp="$ac_cv_use_spandsp/include"
|
|
libdsp="$ac_cv_use_spandsp/lib/libspandsp.so"
|
|
if [[ -f "$incdsp/spandsp/t30.h" -a -f "$libdsp" ]]; then
|
|
HAVE_SPANDSP=yes
|
|
SPANDSP_INC="-I$incdsp/spandsp -I$incdsp"
|
|
SPANDSP_LIB="-L$ac_cv_use_spandsp/lib -lspandsp -ltiff"
|
|
fi
|
|
AC_MSG_RESULT([$HAVE_SPANDSP])
|
|
fi
|
|
AC_SUBST(HAVE_SPANDSP)
|
|
AC_SUBST(SPANDSP_INC)
|
|
AC_SUBST(SPANDSP_LIB)
|
|
|
|
HAVE_GTK=no
|
|
GTK_INC=""
|
|
GTK_LIB=""
|
|
AC_ARG_WITH(libgtk,AC_HELP_STRING([--with-libgtk],[use Gtk for graphical clients (default)]),[ac_cv_use_libgtk=$withval],[ac_cv_use_libgtk=yes])
|
|
if [[ "x$ac_cv_use_libgtk" = "xyes" ]]; then
|
|
AC_MSG_CHECKING([for Gtk using gtk-config])
|
|
vergt=`gtk-config --version gtk 2>/dev/null`
|
|
incgt=`gtk-config --cflags gthread 2>/dev/null`
|
|
libgt=`gtk-config --libs gthread 2>/dev/null`
|
|
if [[ "x$incgt" != "x" -a "x$libgt" != "x" ]]; then
|
|
HAVE_GTK=yes
|
|
GTK_INC="$incgt"
|
|
GTK_LIB="$libgt"
|
|
ac_cv_use_libgtk="no"
|
|
fi
|
|
AC_MSG_RESULT([$vergt])
|
|
fi
|
|
AC_SUBST(HAVE_GTK)
|
|
AC_SUBST(GTK_INC)
|
|
AC_SUBST(GTK_LIB)
|
|
|
|
HAVE_QT=no
|
|
QT_DIR=""
|
|
QT_INC=""
|
|
AC_ARG_WITH(libqt,AC_HELP_STRING([--with-libqt],[use Qt for graphical clients (default)]),[ac_cv_use_libqt=$withval],[ac_cv_use_libqt=yes])
|
|
if [[ "x$ac_cv_use_libqt" != "xno" ]]; then
|
|
qtdir="$ac_cv_use_libqt"
|
|
if [[ "x$ac_cv_use_libqt" = "xyes" ]]; then
|
|
qtdir="$QTDIR"
|
|
if [[ "x$qtdir" = "x" ]]; then
|
|
qtdir=`ls -d -1 /opt/qt-3* /usr/share/qt3* /usr/lib/qt-3* /usr/lib/qt3* 2>/dev/null | tail -1`
|
|
fi
|
|
fi
|
|
if [[ "x$qtdir" != "x" ]]; then
|
|
AC_MSG_CHECKING([for multithreaded Qt3 in $qtdir])
|
|
if [[ -x "$qtdir/bin/moc" -a -f "$qtdir/lib/libqt-mt.so" ]]; then
|
|
for i in "$qtdir/include" "$qtdir/include/qt3" "/usr/include/qt3"; do
|
|
if [[ -f "$i/qkeysequence.h" ]]; then
|
|
QT_INC="$i"
|
|
break;
|
|
fi
|
|
done
|
|
if [[ "x$QT_INC" != "x" ]]; then
|
|
HAVE_QT=yes
|
|
QT_DIR="$qtdir"
|
|
fi
|
|
fi
|
|
AC_MSG_RESULT([$HAVE_QT])
|
|
fi
|
|
fi
|
|
AC_SUBST(HAVE_QT)
|
|
AC_SUBST(QT_DIR)
|
|
AC_SUBST(QT_INC)
|
|
|
|
RTTI_OPT=""
|
|
AC_ARG_ENABLE(rtti,AC_HELP_STRING([--enable-rtti],[Enable RTTI support (default: like pwlib)]),want_rtti=$enableval,want_rtti=auto)
|
|
AC_MSG_CHECKING([whether to enable RTTI support])
|
|
USE_RTTI="$want_rtti"
|
|
case "x$want_rtti" in
|
|
xyes|xno|xnone)
|
|
;;
|
|
xauto)
|
|
USE_RTTI="$PWLIB_RTTI"
|
|
;;
|
|
*)
|
|
AC_ERROR([Invalid argument passed to --enable-rtti])
|
|
;;
|
|
esac
|
|
case "$USE_RTTI" in
|
|
yes)
|
|
RTTI_OPT="-frtti"
|
|
;;
|
|
no)
|
|
RTTI_OPT="-fno-rtti"
|
|
;;
|
|
esac
|
|
AC_MSG_RESULT([$USE_RTTI])
|
|
AC_SUBST(USE_RTTI)
|
|
AC_SUBST(RTTI_OPT)
|
|
|
|
if [[ "x$HAVE_H323" != "xno" ]]; then
|
|
if [[ "x$USE_RTTI" != "x$PWLIB_RTTI" ]]; then
|
|
AC_MSG_WARN([Mismatched RTTI setting between Yate ($USE_RTTI) and pwlib ($PWLIB_RTTI)])
|
|
fi
|
|
fi
|
|
|
|
MODULE_CFLAGS="-fno-exceptions -fno-check-new -fPIC $RTTI_OPT $HAVE_GCC_FORMAT_CHECK"
|
|
MODULE_LDFLAGS="-export-dynamic -shared"
|
|
MODULE_SYMBOLS="-Wl,--retain-symbols-file,/dev/null"
|
|
AC_SUBST(MODULE_CFLAGS)
|
|
AC_SUBST(MODULE_LDFLAGS)
|
|
AC_SUBST(MODULE_SYMBOLS)
|
|
|
|
AC_CONFIG_FILES([yate.spec
|
|
yate.pc
|
|
yateversn.h
|
|
Makefile
|
|
modules/Makefile
|
|
scripts/Makefile
|
|
conf.d/Makefile
|
|
contrib/iax/Makefile
|
|
contrib/ysip/Makefile
|
|
contrib/qt/Makefile
|
|
test/Makefile])
|
|
AC_CONFIG_FILES([yate-config],[chmod +x yate-config])
|
|
AC_CONFIG_FILES([run],[chmod +x run])
|
|
CONFIGURE_FILES=`echo "$ac_config_files config.status config.log" | sed 's/yate\.spec *//'`
|
|
AC_SUBST(CONFIGURE_FILES)
|
|
AC_OUTPUT
|