#! /bin/sh

# yate-config
# This file is part of the YATE Project http://YATE.null.ro
#
# This is a generated file. You should never need to modify it.
# Take a look at the source file yate-config.sh instead.
#
# Yet Another Telephony Engine - a fully featured software PBX and IVR
# Copyright (C) 2005-2014 Null Team
#
# This software is distributed under multiple licenses;
# see the COPYING file in the main directory for licensing
# information for this specific distribution.
#
# This use of this software may be subject to additional restrictions.
# See the LEGAL file in the main directory for details.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ustr='Usage: yate-config [--cflags] [--includes] [--c-all]
                   [--ldflags] [--libs] [--ld-all] [--ld-nostrip] [--ld-strip]
		   [--config] [--libdir] [--modules] [--share]
		   [--helpdir] [--scripts] [--skins]
		   [--version] [--release] [--archlib] [--param=...]'
if [ "$#" = 0 ]; then
    echo "$ustr"
    exit 0
fi
prefix="/usr"
exec_prefix="${prefix}"
datarootdir="${prefix}/share"
shrdir="${datarootdir}/yate"
libdir="${exec_prefix}/lib"
moddir="${exec_prefix}/lib/yate"
confdir="/etc/yate"
s1="-Wno-overloaded-virtual  -fno-exceptions -fPIC -DHAVE_GCC_FORMAT_CHECK -DHAVE_BLOCK_RETURN -DATOMIC_OPS"
s2="-I${prefix}/include/yate"
s3="-rdynamic -shared -Wl,--unresolved-symbols=ignore-in-shared-libs"
s4="-Wl,--retain-symbols-file,/dev/null"
s5="-L$libdir -lyate"

while [ "$#" != 0 ]; do
    case "$1" in
	--version)
	    echo "6.4.1"
	    ;;
	--release)
	    echo "devel1"
	    ;;
	--revision)
	    echo "f46ba196e1b4e083923f522306ba81d1bf65c688"
	    ;;
	--cflags)
	    echo "$s1"
	    ;;
	--includes)
	    echo "$s2"
	    ;;
	--c-all)
	    echo "$s1 $s2"
	    ;;
	--ldflags)
	    echo "$s3 $s4"
	    ;;
	--libs)
	    echo "$s5"
	    ;;
	--ld-all)
	    echo "$s3 $s4 $s5"
	    ;;
	--ld-nostrip)
	    echo "$s3 $s5"
	    ;;
	--ld-strip)
	    echo "$s4"
	    ;;
	--config)
	    echo "$confdir"
	    ;;
	--libdir)
	    echo "$libdir"
	    ;;
	--modules)
	    echo "$moddir"
	    ;;
	--share)
	    echo "$shrdir"
	    ;;
	--helpdir)
	    echo "$shrdir/help"
	    ;;
	--skins)
	    echo "$shrdir/skins"
	    ;;
	--scripts)
	    echo "$shrdir/scripts"
	    ;;
	--archlib)
	    echo "lib64"
	    ;;
	--param=KDOC_BIN)
	    echo ""
	    ;;
	--param=DOXYGEN_BIN)
	    echo "/usr/bin/doxygen"
	    ;;
	--param=SONAME_OPT)
	    echo "-shared -Wl,-soname="
	    ;;
	--param=INSTALL_D)
	    echo "install -D"
	    ;;
	--param=INSTALL_L)
	    echo "-m 0644"
	    ;;
	--param=RTTI_OPT)
	    echo ""
	    ;;
	--param=USE_RTTI)
	    echo "none"
	    ;;
	--param=COREDUMPER_LIB)
	    echo ""
	    ;;
	--param=COREDUMPER_INC)
	    echo ""
	    ;;
	--param=HAVE_COREDUMPER)
	    echo "no"
	    ;;
	--param=HAVE_MALLINFO)
	    echo "yes"
	    ;;
	--param=QT4_STATIC_MODULES)
	    echo "no"
	    ;;
	--param=QT4_VER)
	    echo ""
	    ;;
	--param=QT4_MOC)
	    echo ""
	    ;;
	--param=QT4_LIB_NET)
	    echo ""
	    ;;
	--param=QT4_INC_NET)
	    echo ""
	    ;;
	--param=QT4_LIB)
	    echo ""
	    ;;
	--param=QT4_INC)
	    echo ""
	    ;;
	--param=HAVE_QT4)
	    echo "no"
	    ;;
	--param=LIBUSB_LIB)
	    echo "-lusb-1.0"
	    ;;
	--param=LIBUSB_INC)
	    echo "-DHAVE_LIBUSB_VER -I/usr/include/libusb-1.0"
	    ;;
	--param=HAVE_LIBUSB)
	    echo "yes"
	    ;;
	--param=ZLIB_LIB)
	    echo "-lz"
	    ;;
	--param=ZLIB_INC)
	    echo "-I/usr/include"
	    ;;
	--param=HAVE_ZLIB)
	    echo "yes"
	    ;;
	--param=OPENSSL_VER)
	    echo "3.6.2"
	    ;;
	--param=OPENSSL_LIB)
	    echo "-lssl -lcrypto"
	    ;;
	--param=OPENSSL_INC)
	    echo "-DUSE_TLS_METHOD -DNO_AESCTR "
	    ;;
	--param=HAVE_OPENSSL)
	    echo "yes"
	    ;;
	--param=H323_RUN)
	    echo ""
	    ;;
	--param=H323_LIB)
	    echo ""
	    ;;
	--param=H323_INC)
	    echo ""
	    ;;
	--param=HAVE_H323)
	    echo "no"
	    ;;
	--param=SPANDSP_LIB)
	    echo "-lspandsp"
	    ;;
	--param=SPANDSP_INC)
	    echo ""
	    ;;
	--param=HAVE_SPANDSP)
	    echo "no"
	    ;;
	--param=AMRNB_LIB)
	    echo "-lamrnb"
	    ;;
	--param=AMRNB_INC)
	    echo ""
	    ;;
	--param=HAVE_AMRNB)
	    echo "no"
	    ;;
	--param=SPEEX_LIB)
	    echo "-lspeex"
	    ;;
	--param=SPEEX_INC)
	    echo "-I/usr/include"
	    ;;
	--param=HAVE_SPEEX)
	    echo "yes"
	    ;;
	--param=G722WR_INC)
	    echo "-I/startdir/src/yate/libs/miniwebrtc/audio/coding_g722"
	    ;;
	--param=HAVE_G722WR)
	    echo "yes"
	    ;;
	--param=ISAC_INC)
	    echo "-I/startdir/src/yate/libs/miniwebrtc/audio/coding_isac/main"
	    ;;
	--param=HAVE_ISAC)
	    echo "yes"
	    ;;
	--param=ILBCWR_INC)
	    echo "-I/startdir/src/yate/libs/miniwebrtc/audio/coding_ilbc"
	    ;;
	--param=HAVE_ILBCWR)
	    echo "yes"
	    ;;
	--param=ILBC_INC)
	    echo "-I/startdir/src/yate/libs/ilbc"
	    ;;
	--param=HAVE_ILBC)
	    echo "yes"
	    ;;
	--param=GSM_LIB)
	    echo "-lgsm"
	    ;;
	--param=GSM_INC)
	    echo "-I/usr/include/gsm"
	    ;;
	--param=HAVE_GSM)
	    echo "yes"
	    ;;
	--param=HAVE_COREAUDIO)
	    echo "no"
	    ;;
	--param=HAVE_ALSA)
	    echo "yes"
	    ;;
	--param=HAVE_SOUNDCARD)
	    echo "yes"
	    ;;
	--param=WANPIPE_FLAGS)
	    echo ""
	    ;;
	--param=HAVE_WANPIPE_TDM)
	    echo "no"
	    ;;
	--param=HAVE_WANPIPE)
	    echo "no"
	    ;;
	--param=BUILD_TDMCARD)
	    echo "yes"
	    ;;
	--param=BUILD_WPCARD)
	    echo "yes"
	    ;;
	--param=ZAP_FLAGS)
	    echo ""
	    ;;
	--param=HAVE_ZAP)
	    echo "no"
	    ;;
	--param=SQLITE_LIB)
	    echo "-lsqlite3"
	    ;;
	--param=SQLITE_INC)
	    echo ""
	    ;;
	--param=HAVE_SQLITE)
	    echo "yes"
	    ;;
	--param=MYSQL_VER)
	    echo "12.2.2"
	    ;;
	--param=MYSQL_LIB)
	    echo "-L/usr/lib/ -lmariadb"
	    ;;
	--param=MYSQL_INC)
	    echo "-I/usr/include/mysql -I/usr/include/mysql/mysql -DMYSQL_OPT_RECONNECT=MYSQL_OPT_RECONNECT -DMYSQL_OPT_READ_TIMEOUT=MYSQL_OPT_READ_TIMEOUT -DMYSQL_OPT_WRITE_TIMEOUT=MYSQL_OPT_WRITE_TIMEOUT -DHAVE_MYSQL_SET_CHARSET -DHAVE_MYSQL_MY_BOOL"
	    ;;
	--param=HAVE_MYSQL)
	    echo "yes"
	    ;;
	--param=PGSQL_LIB)
	    echo "-Lyes/lib -lpq"
	    ;;
	--param=PGSQL_INC)
	    echo ""
	    ;;
	--param=HAVE_PGSQL)
	    echo "no"
	    ;;
	--param=HAVE_MACOSX_SUPPORT)
	    echo "no"
	    ;;
	--param=MACOSX_INC)
	    echo ""
	    ;;
	--param=INTERNAL_REGEX)
	    echo "no"
	    ;;
	--param=RESOLV_LIB)
	    echo ""
	    ;;
	--param=RESOLV_INC)
	    echo ""
	    ;;
	--param=HAVE_RESOLV)
	    echo "yes"
	    ;;
	--param=SCTP_FLAGS)
	    echo "-DHAVE_SCTP"
	    ;;
	--param=HAVE_SCTP_NETINET)
	    echo "no"
	    ;;
	--param=HAVE_SCTP)
	    echo "yes"
	    ;;
	--param=SSE2_OPS)
	    echo "no"
	    ;;
	--param=ATOMIC_OPS)
	    echo "-DATOMIC_OPS"
	    ;;
	--param=INLINE_FLAGS)
	    echo ""
	    ;;
	--param=THREAD_AFFINITY)
	    echo "-DTHREAD_AFFINITY"
	    ;;
	--param=NETDB_FLAGS)
	    echo " -DHAVE_NTOP -DHAVE_PTON -DHAVE_GHBN_R -DHAVE_GHBN2_R -DHAVE_GHBN2"
	    ;;
	--param=DLOPEN_LIB)
	    echo ""
	    ;;
	--param=THREAD_LIB)
	    echo "-lpthread"
	    ;;
	--param=HAVE_POLL)
	    echo "yes"
	    ;;
	--param=HAVE_INT_TZ)
	    echo "-DHAVE_INT_TZ"
	    ;;
	--param=HAVE_GMTOFF)
	    echo "-DHAVE_GMTOFF"
	    ;;
	--param=HAVE_SOCKADDR_LEN)
	    echo ""
	    ;;
	--param=HAVE_PRCTL)
	    echo "-DHAVE_PRCTL"
	    ;;
	--param=HAVE_GETCWD)
	    echo "-DHAVE_GETCWD"
	    ;;
	--param=HAVE_BLOCK_RETURN)
	    echo "-DHAVE_BLOCK_RETURN"
	    ;;
	*)
	    echo "I didn't understand: $1" >&2
	    echo "$ustr" >&2
	    exit 1
	    ;;
    esac
    shift
done
