?? configure.in
字號:
dnl Process this file with autoconf to produce a configure script.AC_REVISION($Revision: 1.60 $)dnlAC_PREREQ(2.50)AC_INIT(include/eXosip2/eXosip.h)dnl require at least autoconf v 2.00dnl AC_COPYRIGHT (COPYRIGHT-NOTICE)AC_MSG_NOTICE([eXosip2 The Extended Open SIP library.])AC_MSG_NOTICE([Copyright (C) 2002,2003,2004,2005,2006,2007 Aymeric MOIZARD - <jack@atosc.org>])dnl *********************************************************************dnl Source packaging numbersEXOSIP_MAJOR_VERSION=3EXOSIP_MINOR_VERSION=1EXOSIP_MICRO_VERSION=0SONAME_MAJOR_VERSION=6SONAME_MINOR_VERSION=0SONAME_MICRO_VERSION=2dnl program extensionEXOSIP_VERSION=$EXOSIP_MAJOR_VERSION.$EXOSIP_MINOR_VERSION.$EXOSIP_MICRO_VERSIONLIBEXOSIP_SO_VERSION=$SONAME_MAJOR_VERSION:$SONAME_MINOR_VERSION:$SONAME_MICRO_VERSIONAC_SUBST(LIBEXOSIP_SO_VERSION, $LIBEXOSIP_SO_VERSION)AC_SUBST(EXOSIP_VERSION)if test "x$PRERELEASE" = "x"; then VERSION=$EXOSIP_VERSIONelse VERSION="$EXOSIP_VERSION-$PRERELEASE"fiPACKAGE=libeXosip2AC_MSG_RESULT([Configuring ${PACKAGE} ${VERSION}])OS=`uname|sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`AC_MSG_RESULT([Building Package on ${OS}])dnl *********************************************************************dnl Initialize automake stuffAC_CONFIG_AUX_DIR(scripts)AM_CONFIG_HEADER(config.h)AM_INIT_AUTOMAKE($PACKAGE, $VERSION)AM_ACLOCAL_INCLUDE(scripts)AC_CANONICAL_HOSTAC_SUBST(ac_aux_dir)dnl Checks for programs.AC_PROG_CCAC_PROG_CPPAC_PROG_CXXAC_PROG_INSTALLdnl enable --enable-shared and --disable-shared optionsLT_AC_PROG_SEDAC_PROG_LIBTOOL#AC_ENABLE_SHARED(yes)dnl declare --enable-* args and collect ac_help stringsAC_ARG_ENABLE(tools,[ --disable-tools compile tools programs (yes).],enable_tools=$enableval,enable_tools="yes")AC_ARG_ENABLE(debug,[ --disable-debug turn on debugging (yes).],enable_debug=$enableval,enable_debug="yes")AC_ARG_ENABLE(trace,[ --disable-trace turn on trace (yes).],enable_trace=$enableval,enable_trace="yes")AC_ARG_ENABLE(mpatrol,[ --enable-mpatrol turn on memory leak detection with patrol (no).],enable_mpatrol=$enableval,enable_mpatrol="no")AC_ARG_ENABLE(gprof,[ --enable-gprof turn on profiling support.],enable_gprof=$enableval,enable_gprof="no")dnl support for linux-thread or posix thread (pthread.h)AC_ARG_ENABLE(pthread,[ --enable-pthread enable support for POSIX threads. (autodetect)],enable_pthread=$enableval,enable_pthread="no")dnl support for semaphore.h (linux/sun...)AC_ARG_ENABLE(semaphore,[ --enable-semaphore enable support for semaphore (semaphore.h)],enable_semaphore=$enableval,enable_semaphore="no")dnl support for sysV semaphore in sys/sem.h (BSD/linux...)AC_ARG_ENABLE(sysv,[ --enable-sysv enable support for sysV semaphore (sys/sem.h).],enable_sysv=$enableval,enable_sysv="no")dnl minimize size of code.AC_ARG_ENABLE(minisize,[ --enable-minisize only compile minimal voip related code).],enable_minisize=$enableval,enable_minisize="no")dnl build with multithreaded support (need semaphore).AC_ARG_ENABLE(mt,[ --enable-mt compile eXosip2 without multi-thread support.],enable_mt=$enableval,enable_mt="yes")dnl compile with mt supportif test "x$enable_mt" = "xyes"; then if test "x$enable_pthread" = "xyes"; then EXOSIP_FLAGS="-DOSIP_MT -DHAVE_PTHREAD" SIP_FSM_FLAGS="-DHAVE_PTHREAD" dnl FSM_LIB="-lpthread" else EXOSIP_FLAGS="$EXOSIP_FLAGS -DOSIP_MT" ACX_PTHREAD() fifiAM_CONDITIONAL(COMPILE_TOOLS, test "x$enable_tools" = "xyes")if test "x$enable_semaphore" = "xyes"; then EXOSIP_FLAGS="$EXOSIP_FLAGS -DHAVE_SEMAPHORE_H" AC_CHECK_HEADERS(semaphore.h)elif test "x$enable_sysv" = "xyes"; then EXOSIP_FLAGS="$EXOSIP_FLAGS -UHAVE_SEMAPHORE_H -DHAVE_SYS_SEM_H" AC_CHECK_HEADERS(sys/sem.h)else AC_CHECK_HEADERS(semaphore.h) AC_CHECK_HEADERS(sys/sem.h)fiif test "x$host_cpu" = "x$build_cpu"; then case $OS in linux*) EXOSIP_FLAGS="$EXOSIP_FLAGS -pedantic" ;; irix*) ;; hpux* | hp-ux*) ;; aix*) ;; osf*) AC_CHECK_LIB(rt,sem_open,[EXOSIP_LIB="$EXOSIP_LIB -lrt"]) ;; sunos*) ;; darwin*) EXOSIP_FLAGS="$EXOSIP_FLAGS -pedantic" ;; *) ;; esacelse AC_MSG_NOTICE([Cross compiling exosip.])fiif test "x$enable_debug" = "xyes"; then EXOSIP_FLAGS="$EXOSIP_FLAGS -DENABLE_DEBUG -g" CFLAGS=`echo $CFLAGS | sed 's/-O.//'`fiif test "x$enable_trace" = "xyes"; then EXOSIP_FLAGS="$EXOSIP_FLAGS -DENABLE_TRACE"fiif test "x$enable_mpatrol" = "xyes"; then EXOSIP_FLAGS="$EXOSIP_FLAGS -DENABLE_MPATROL" EXOSIP_LIB="$EXOSIP_LIB -lmpatrolmt -lelf"fiif test "x$enable_gprof" = "xyes"; then EXOSIP_FLAGS="$EXOSIP_FLAGS -pg"fiif test "x$enable_minisize" = "xyes"; then EXOSIP_FLAGS="$EXOSIP_FLAGS -DMINISIZE"fiAM_CONDITIONAL(BUILD_MAXSIZE, test x$enable_minisize = xno)dnl Checks for libraries.AC_CHECK_LIB(posix4,sem_open,[EXOSIP_LIB="$EXOSIP_LIB -lposix4 -mt"])AC_CHECK_LIB(nsl,nis_add,[EXOSIP_LIB="$EXOSIP_LIB -lnsl"])AC_CHECK_LIB(socket,sendto,[EXOSIP_LIB="$EXOSIP_LIB -lsocket"])AC_CHECK_LIB(rt,clock_gettime,[EXOSIP_LIB="$EXOSIP_LIB -lrt"])AC_CHECK_LIB(ssl,SSL_CTX_new,[EXOSIP_LIB="$EXOSIP_LIB -lssl"])case $OS in openbsd*) ;; *) AC_CHECK_LIB(resolv,res_query,[EXOSIP_LIB="$EXOSIP_LIB -lresolv"]) AC_CHECK_LIB(resolv,__res_query,[EXOSIP_LIB="$EXOSIP_LIB -lresolv"]) ;;esacPKG_CHECK_MODULES(OSIP, libosip2 >= 3.1, [], [AC_MSG_WARN([assuming osip can be found in -I$includedir and -L$libdir])OSIP_CFLAGS='-I$(includedir) -I$(prefix)/include'OSIP_LIBS='-L$(libdir) -L$(prefix)/lib -losip2 -losipparser2'])EXOSIP_FLAGS="$EXOSIP_FLAGS"AC_CACHE_CHECK([whether -Wall works], Wall_flag, [ saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="-Wall" AC_TRY_COMPILE(, , Wall_flag=yes, Wall_flag=no) CPPFLAGS=$saved_CPPFLAGS])if test "x$Wall_flag" = xyes; then CPPFLAGS="$CPPFLAGS -Wall"fiAC_CACHE_CHECK([whether -Wcast-align works], Wcast_align_flag, [ saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="-Wcast-align" AC_TRY_COMPILE(, , Wcast_align_flag=yes, Wcast_align_flag=no) CPPFLAGS=$saved_CPPFLAGS])if test "x$Wcast_align_flag" = xyes; then CPPFLAGS="$CPPFLAGS -Wcast-align"fiAC_CACHE_CHECK([whether -Wchar-subscripts works], Wchar_subscripts_flag, [ saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="-Wchar-subscripts" AC_TRY_COMPILE(, , Wchar_subscripts_flag=yes, Wchar_subscripts_flag=no) CPPFLAGS=$saved_CPPFLAGS])if test "x$Wchar_subscripts_flag" = xyes; then CPPFLAGS="$CPPFLAGS -Wchar-subscripts"fiAC_CACHE_CHECK([whether -Wformat works], Wformat_flag, [ saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="-Wformat" AC_TRY_COMPILE(, , Wformat_flag=yes, Wformat_flag=no) CPPFLAGS=$saved_CPPFLAGS])if test "x$Wformat_flag" = xyes; then CPPFLAGS="$CPPFLAGS -Wformat"fiAC_CACHE_CHECK([whether -Winline works], Winline_flag, [ saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="-Winline" AC_TRY_COMPILE(, , Winline_flag=yes, Winline_flag=no) CPPFLAGS=$saved_CPPFLAGS])if test "x$Winline_flag" = xyes; then CPPFLAGS="$CPPFLAGS -Winline"fiAC_CACHE_CHECK([whether -Wmissing-declarations works], Wmissing_declarations_flag, [ saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="-Wmissing-declarations" AC_TRY_COMPILE(, , Wmissing_declarations_flag=yes, Wmissing_declarations_flag=no) CPPFLAGS=$saved_CPPFLAGS])if test "x$Wmissing_declarations_flag" = xyes; then CPPFLAGS="$CPPFLAGS -Wmissing-declarations"fiAC_CACHE_CHECK([whether -Wmissing-prototypes works], Wmissing_prototypes_flag, [ saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="-Wmissing-prototypes" AC_TRY_COMPILE(, , Wmissing_prototypes_flag=yes, Wmissing_prototypes_flag=no) CPPFLAGS=$saved_CPPFLAGS])if test "x$Wmissing_prototypes_flag" = xyes; then CPPFLAGS="$CPPFLAGS -Wmissing-prototypes"fiAC_CACHE_CHECK([whether -Wnested-externs works], Wnested_externs_flag, [ saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="-Wnested-externs" AC_TRY_COMPILE(, , Wnested_externs_flag=yes, Wnested_externs_flag=no) CPPFLAGS=$saved_CPPFLAGS])if test "x$Wnested_externs_flag" = xyes; then CPPFLAGS="$CPPFLAGS -Wnested-externs"fiAC_CACHE_CHECK([whether -Wpointer-arith works], Wpointer_arith_flag, [ saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="-Wpointer-arith" AC_TRY_COMPILE(, , Wpointer_arith_flag=yes, Wpointer_arith_flag=no) CPPFLAGS=$saved_CPPFLAGS])if test "x$Wpointer_arith_flag" = xyes; then CPPFLAGS="$CPPFLAGS -Wpointer-arith"fiTOOLS_LIBS=$TOOLS_LIBSAC_SUBST(TOOLS_LIBS)AC_SUBST(EXOSIP_FLAGS)AC_SUBST(EXOSIP_LIB)AC_SUBST(CFLAGS)dnl Checks for header files.AC_HEADER_STDCAC_CHECK_HEADERS(ctype.h)AC_CHECK_HEADERS(string.h)AC_CHECK_HEADERS(strings.h)AC_CHECK_HEADERS(stdio.h)AC_CHECK_HEADERS(stdlib.h)AC_CHECK_HEADERS(unistd.h)AC_CHECK_HEADERS(stdarg.h)AC_CHECK_HEADERS(varargs.h)AC_CHECK_HEADERS(sys/time.h)AC_CHECK_HEADERS(assert.h)AC_CHECK_HEADERS(signal.h)AC_CHECK_HEADERS(sys/signal.h)AC_CHECK_HEADERS(malloc.h)AC_CHECK_HEADERS(sys/select.h)AC_CHECK_HEADERS(sys/types.h)AC_CHECK_HEADERS(fcntl.h)AC_CHECK_HEADERS(sys/soundcard.h)AC_CHECK_HEADERS(arpa/inet.h)AC_CHECK_HEADERS(arpa/nameser.h)AC_CHECK_HEADERS(netdb.h)AC_CHECK_HEADERS(resolv8_compat.h)AC_CHECK_HEADERS([resolv.h], [], [],[#if HAVE_SYS_TYPES_H#include <sys/types.h>#endif#if HAVE_NETINET_IN_H#include <netinet/in.h>#endif#if HAVE_ARPA_NAMESER_H#include <arpa/nameser.h>#endif])dnl check if we have the getifaddrs() sytem callAC_CHECK_FUNCS(getifaddrs)AC_CHECK_HEADERS(openssl/ssl.h)AC_OUTPUT( Makefile scripts/Makefile platform/Makefile platform/vsnet/Makefile platform/wince/Makefile include/Makefile include/eXosip2/Makefile src/Makefile tools/Makefile help/Makefile help/doxygen/Makefile help/doxygen/doxygen.dox)
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -