From: Craig S. <cso...@us...> - 2004-08-24 14:23:23
|
Update of /cvsroot/openh323/openh323 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20477 Added Files: configure.ac Log Message: Fixed problem with plugin codecs using capability compare functions --- NEW FILE: configure.ac --- AC_INIT(include/h323.h) AC_PROG_CXX AC_HEADER_STDC dnl ######################################################################## dnl set the OpenH323 directory to the current directory OPENH323DIR=`pwd` AC_SUBST(OPENH323DIR) dnl ######################################################################## dnl set the PREFIX accordingly if test "x$prefix" = "xNONE"; then INSTALLPREFIX="/usr/local" else INSTALLPREFIX="${prefix}" fi AC_SUBST(INSTALLPREFIX) dnl ######################################################################## dnl set LIBDIR accordingly LIBDIR="${libdir}" AC_SUBST(LIBDIR) dnl ######################################################################## dnl extract the OpenH323 version MAJOR_VERSION=`cat ${OPENH323DIR}/version.h | grep MAJOR_VERSION | cut -f3 -d' '` MINOR_VERSION=`cat ${OPENH323DIR}/version.h | grep MINOR_VERSION | cut -f3 -d' '` BUILD_NUMBER=`cat ${OPENH323DIR}/version.h | grep BUILD_NUMBER | cut -f3 -d' '` OPENH323_VERSION="${MAJOR_VERSION}.${MINOR_VERSION}.${BUILD_NUMBER}" AC_SUBST(OPENH323_VERSION) echo "OpenH323 version is ${OPENH323_VERSION}" AC_DEFINE_UNQUOTED(OPENH323_MAJOR, $MAJOR_VERSION) AC_DEFINE_UNQUOTED(OPENH323_MINOR, $MINOR_VERSION) AC_DEFINE_UNQUOTED(OPENH323_BUILD, $BUILD_NUMBER) AC_DEFINE_UNQUOTED(OPENH323_VERSION, "$OPENH323_VERSION") dnl ######################################################################## dnl look for ptlib, use a preference order of explicit PWLIBDIR, directory dnl at same level, home directory, /usr/local or /usr. if test "${PWLIBDIR:-unset}" != "unset" ; then AC_CHECK_FILE(${PWLIBDIR}/version.h, HAS_PTLIB=1) fi if test "${HAS_PTLIB:-unset}" = "unset" ; then AC_CHECK_FILE(${OPENH323DIR}/../pwlib/version.h, HAS_PTLIB=1) if test "${HAS_PTLIB:-unset}" != "unset" ; then PWLIBDIR="${OPENH323DIR}/../pwlib" else AC_CHECK_FILE(${HOME}/pwlib/include/ptlib.h, HAS_PTLIB=1) if test "${HAS_PTLIB:-unset}" != "unset" ; then PWLIBDIR="${HOME}/pwlib" else AC_CHECK_FILE(/usr/local/include/ptlib.h, HAS_PTLIB=1) if test "${HAS_PTLIB:-unset}" != "unset" ; then AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/bin) else AC_CHECK_FILE(/usr/include/ptlib.h, HAS_PTLIB=1) if test "${HAS_PTLIB:-unset}" != "unset" ; then AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/share/pwlib/make/) fi fi fi fi fi if test "${HAS_PTLIB:-unset}" = "unset" ; then echo "Cannot find pwlib - please install or set PWLIBDIR and try again" exit fi if test "${PWLIBDIR:-unset}" = "unset" ; then if test "${PTLIB_CONFIG:-unset}" = "unset" ; then echo "Cannot find ptlib-config - please install and try again" exit fi PWLIBDIR=`$PTLIB_CONFIG --prefix` fi if test "x$PWLIBDIR" = "x/usr" -o "x$PWLIBDIR" = "x/usr/"; then PWLIBDIR="/usr/share/pwlib/" fi if test "x$PWLIBDIR" = "x/usr/local" -o "x$PWLIBDIR" = "x/usr/"; then PWLIBDIR="/usr/local/share/pwlib/" fi echo "PWLib prefix set to.... $PWLIBDIR" AC_SUBST(PWLIBDIR) dnl ######################################################################## dnl check for disbling ASN tracing AC_ARG_ENABLE(asntracing, [ --disable-asntracing disable ASN tracing], DISABLE_ASN_TRACING=$enableval) if test "${DISABLE_ASN_TRACING}x" != "x" ; then AC_MSG_NOTICE(Disabling ASN tracing) AC_SUBST(NOTRACE, 1) fi dnl ######################################################################## dnl Enable audio subsystems dnl MSWIN_DISPLAY audiocodecs,Audio Software Codecs dnl MSWIN_DEFINE audiocodecs,H323_AUDIO_CODECS AC_ARG_ENABLE(audio, [ --disable-audio disable audio codecs], DISABLE_AUDIO=$enableval) if test "${DISABLE_AUDIO}x" != "x" ; then AC_MSG_NOTICE(Disabling audio functions) AC_SUBST(NOAUDIOCODECS, 1) else AC_DEFINE(H323_AUDIO_CODECS, 1) AC_ARG_ENABLE(embeddedgsm, [ --enable-embeddedgsm embed GSM codec via static linking], EMBEDDED_GSM=$enableval) if test "${EMBEDDED_GSM}x" != "x" ; then AC_MSG_NOTICE(Embedding GSM codec) LDFLAGS="$LDFLAGS -L${OPENH323DIR}/plugins/audio/GSM0610" ENDLDLIBS="$ENDLDLIBS -lgsm0610_audio_s" AC_CHECK_LIB(gsm, gsm_create, GSM=1) if test "x$GSM" != "x"; then ENDLDLIBS="$ENDLDLIBS -lgsm" fi AC_DEFINE(H323_EMBEDDED_GSM) fi fi dnl ######################################################################## dnl Enable video subsystems dnl MSWIN_DISPLAY video,Video System dnl MSWIN_DEFINE video,H323_VIDEO AC_ARG_ENABLE(video, [ --disable-video disable video functions], DISABLE_VIDEO=$enableval) if test "${DISABLE_VIDEO}x" != "x" ; then AC_MSG_NOTICE(Disabling video codecs) AC_SUBST(NOVIDEO, 1) else AC_DEFINE(H323_VIDEO, 1) fi dnl ######################################################################## dnl look for avcodec compatible with RFC 2190 dnl MSWIN_DISPLAY avcodec,ffmpeg RFC2190 AVCODEC Library dnl MSWIN_CHECK_FILE avcodec,avcodec_rfc2190.h,H323_RFC2190_AVCODEC=1 dnl MSWIN_DIR_SYMBOL avcodec,H323_RFC2190_AVCODEC_DIR dnl MSWIN_CHECK_DIR avcodec,..\ffmpeg\libavcodec\ dnl MSWIN_CHECK_DIR avcodec,..\external\ffmpeg\libavcodec\ dnl MSWIN_CHECK_DIR avcodec,\ffmpeg\libavcodec\ dnl MSWIN_CHECK_DIR avcodec,c:\ffmpeg\libavcodec\ if test "${DISABLE_VIDEO}x" = "x" ; then AC_ARG_ENABLE(rfc2190avcodec, [ --enable-rfc2190avcodec specify RFC 2190 compatible avcodec headers], H323_RFC2190_AVCODEC_DIR=$enableval) if test "${H323_RFC2190_AVCODEC_DIR}x" = "x" ; then AC_MSG_NOTICE(Skipping tests for RFC 2190 H.263 support) else AC_MSG_NOTICE(Checking for RFC2190 H.263 codec) AC_CHECK_HEADER(${H323_RFC2190_AVCODEC_DIR}/avcodec.h, H323_RFC2190_AVCODEC=1) if test "${H323_RFC2190_AVCODEC}" == "1" ; then AC_DEFINE(H323_RFC2190_AVCODEC) AC_SUBST(H323_RFC2190_AVCODEC, 1) AC_SUBST(H323_RFC2190_AVCODEC_DIR, ${H323_RFC2190_AVCODEC_DIR}) STDCCFLAGS="${STDCCFLAGS} -I${H323_RFC2190_AVCODEC_DIR}" fi fi AC_ARG_ENABLE(h263avcodec, [ --enable-h263avcodec enable non-RFC 2190 H.263], NONSTD_H263=$enableval) if test "${NONSTD_H263}x" = "x" ; then AC_MSG_NOTICE(Skipping tests for VIC H.263 and non-standard H.263) else if test "${H323_RFC2190_AVCODEC_DIR}x" != "x" ; then AC_MSG_ERROR(Cannot use both --enable-h263avcodec and --enable-rfc2190avcodec) fi AC_MSG_NOTICE(Searching for non-standard H.253 support) dnl ######################################################################## dnl look for avcodec from library. dnl MSWIN_DISPLAY avcodec,ffmpeg AVCODEC Library dnl MSWIN_CHECK_FILE avcodec,avcodec.h,H323_AVCODEC=1 dnl MSWIN_DIR_SYMBOL avcodec,H323_AVCODEC_DIR dnl MSWIN_CHECK_DIR avcodec,..\ffmpeg\libavcodec\ dnl MSWIN_CHECK_DIR avcodec,..\external\ffmpeg\libavcodec\ dnl MSWIN_CHECK_DIR avcodec,\ffmpeg\libavcodec\ dnl MSWIN_CHECK_DIR avcodec,c:\ffmpeg\libavcodec\ AC_CHECK_HEADERS(avcodec.h, H323_AVCODEC=1) if test "${H323_AVCODEC:-unset}" != "unset" ; then AC_CHECK_LIB(avcodec, avcodec_open, H323_AVCODEC=1, H323_AVCODEC=) fi if test "${H323_AVCODEC:-unset}" != "unset" ; then AC_CHECK_FILE(/usr/local/include/ffmpeg/avcodec.h, H323_AVCODEC=1) fi if test "${H323_AVCODEC:-unset}" != "unset" ; then AC_SUBST(H323_AVCODEC, 1) AC_DEFINE(H323_AVCODEC, 1, "ffmpeg based avodec found") AVCODECINCLUDEDIR=/usr/local/include/ffmpeg AVCODECLIBDIR=/usr/local/lib STDCCFLAGS="$STDCCFLAGS -I${AVCODECINCLUDEDIR}" echo " H263 codec on FFmpeg library enabled" fi AC_SUBST(H323_AVCODEC) dnl ######################################################################## dnl look for vich263 library dnl MSWIN_DISPLAY vich263,VIC H.263 Library dnl MSWIN_CHECK_FILE vich263,encoder-h263.h,H323_VICH263=1 dnl MSWIN_DIR_SYMBOL vich263,H323_VICH263_DIR dnl MSWIN_CHECK_DIR vich263,..\vich263\ dnl MSWIN_CHECK_DIR vich263,..\external\vich263\ dnl MSWIN_CHECK_DIR vich263,\vich263\ dnl MSWIN_CHECK_DIR vich263,c:\vich263\ AC_CHECK_HEADERS(encoder-h263.h, H323_VICH263=1) if test "${H323_VICH263:-unset}" != "unset" ; then AC_CHECK_FILE(/usr/local/lib/libvich263.so, H323_VICH263=1, H323_VICH263=) fi if test "${H323_VICH263:-unset}" != "unset" ; then AC_CHECK_FILE(/usr/local/include/vich263/encoder-h263.h, H323_VICH263=1) fi if test "${H323_VICH263:-unset}" != "unset" ; then AC_SUBST(H323_VICH263, 1) AC_DEFINE(H323_VICH263, 1, "vic H263 codec found") VICH263INCLUDEDIR=/usr/local/include/vich263 VICH263LIBDIR=/usr/local/lib STDCCFLAGS="$STDCCFLAGS -I${VICH263INCLUDEDIR}" echo " H263 codec on libvich263 enabled" fi AC_SUBST(H323_VICH263) fi fi dnl ######################################################################## dnl dnl feature detections migrated from Makefile dnl dnl MSWIN_DISPLAY ixj,Quicknet Internet xJACK cards dnl MSWIN_DEFINE ixj,HAS_IXJ AC_CHECK_HEADERS(linux/telephony.h sys/telephony.h /usr/local/include/sys/telephony.h, HAS_IXJ=1) if test "x$HAS_IXJ" != "x" ; then AC_DEFINE(HAS_IXJ, 1) fi dnl ######################################################################## dnl make directives AC_SUBST(STDCCFLAGS) AC_SUBST(LDFLAGS) AC_SUBST(ENDLDLIBS) AC_PROG_INSTALL AC_CONFIG_FILES(openh323u.mak) AC_CONFIG_FILES(Makefile) dnl ######################################################################## dnl Header file AC_CONFIG_HEADERS(include/openh323buildopts.h) dnl ######################################################################## dnl Output configured files AC_CONFIG_SUBDIRS(plugins) AC_OUTPUT() |