configure.ac 3.56 KB
Newer Older
jpbl's avatar
jpbl committed
1 2 3 4 5
AC_INIT(acinclude.m4)

AM_CONFIG_HEADER(config.h)

dnl figure out the sflphone version
jpbl's avatar
jpbl committed
6
VERSION=`sed -ne 's/^#define VERSION "\(.*\)"/\1/p' src/global.h`
jpbl's avatar
jpbl committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
AC_SUBST(VERSION)

dnl get rid of release number
RPM_VERSION=`echo $VERSION | sed -ne 's/-//p' `
AC_SUBST(RPM_VERSION)

LIBS="$LIBS -lstdc++"

dnl
dnl Solaris pkgadd support definitions
PKGADD_PKG="SFLPhone"
PKGADD_NAME="SFLPhone - a SIP client"
PKGADD_VENDOR="http://www.sflphone.org"
AC_SUBST(PKGADD_PKG)
AC_SUBST(PKGADD_NAME)
AC_SUBST(PKGADD_VENDOR)

AC_LANG_CPLUSPLUS

AC_PROG_CXX
AC_PROG_CC

jpbl's avatar
jpbl committed
29 30 31 32 33 34 35
AC_PATH_QT
dnl KDE_USE_QT(3.3)
AC_CANONICAL_SYSTEM
AC_ARG_PROGRAM
AM_INIT_AUTOMAKE(sflphone, $VERSION)
AM_DISABLE_LIBRARIES
AC_PROG_LIBTOOL
llea's avatar
llea committed
36
AC_CHECK_COMPILERS
jpbl's avatar
jpbl committed
37

jpbl's avatar
jpbl committed
38
CXXFLAGS="$CXXFLAGS $USE_EXCEPTIONS"
jpbl's avatar
jpbl committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56

SFLPHONE_CXXFLAGS=""

case $host in
  *-*-cygwin | *-*-mingw* | *-*-pw32*)
    need_no_undefined=yes
    ;;
  *)
    need_no_undefined=no
    ;;
esac

AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes)

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS( \
ostream \
llea's avatar
llea committed
57
eXosip2/eXosip.h \
jpbl's avatar
jpbl committed
58 59 60
portaudio.h \
)

jpbl's avatar
jpbl committed
61 62 63 64
LIBCCGNU2_MIN_VERSION=1.3.1
PKG_CHECK_MODULES(libccgnu2, libccgnu2 >= ${LIBCCGNU2_MIN_VERSION})
SFLPHONE_CXXFLAGS="$SFLPHONE_CXXFLAGS $libccgnu2_CFLAGS"
SFLPHONE_LIBS="$SFLPHONE_LIBS $libccgnu2_LIBS"
jpbl's avatar
jpbl committed
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80

LIBCCEXT2_MIN_VERSION=1.3.1
PKG_CHECK_MODULES(libccext2, libccext2 >= ${LIBCCEXT2_MIN_VERSION})
SFLPHONE_CXXFLAGS="$SFLPHONE_CXXFLAGS $libccext2_CFLAGS"
SFLPHONE_LIBS="$SFLPHONE_LIBS $libccext2_LIBS"

LIBCCRT_MIN_VERSION=1.3.0
PKG_CHECK_MODULES(libccrtp1, libccrtp1 >= ${LIBCCRT_MIN_VERSION})
SFLPHONE_CXXFLAGS="$SFLPHONE_CXXFLAGS $libccrtp1_CFLAGS"
SFLPHONE_LIBS="$SFLPHONE_LIBS $libccrtp1_LIBS"

LIBOSIP2_MIN_VERSION=2.2.0
PKG_CHECK_MODULES(libosip2, libosip2 >= ${LIBOSIP2_MIN_VERSION})
SFLPHONE_CXXFLAGS="$SFLPHONE_CXXFLAGS $libosip2_CFLAGS"
SFLPHONE_LIBS="$SFLPHONE_LIBS $libosip2_LIBS"

llea's avatar
llea committed
81 82
if test $ac_cv_header_eXosip2_eXosip_h = no; then
   AC_MSG_ERROR([*** missing eXosip2/eXosip.h. You need a working eXosip2 installation. See http://www.antisip.com/download/])
jpbl's avatar
jpbl committed
83
fi
llea's avatar
llea committed
84 85
libexosip2_LIBS="-leXosip2 "
SFLPHONE_LIBS="$SFLPHONE_LIBS $libexosip2_LIBS"
jpbl's avatar
jpbl committed
86 87

AC_SUBST(LIBQT)
jpbl's avatar
jpbl committed
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114

dnl if test $ac_cv_header_gsm_h = no; then
dnl    AC_MSG_ERROR([*** missing gsm.h. You need a working GSM 06.10 lossy speech compression installation. See http://kbs.cs.tu-berlin.de/~jutta/toast.html])
dnl fi
dnl SFLPHONE_LIBS="$SFLPHONE_LIBS -lgsm"

AC_MSG_CHECKING([whether to enable the maintener code])
AC_ARG_ENABLE(maintener,
[  --enable-maintener      Enable maintener code [default=no]],
[
CXXFLAGS="$CXXFLAGS -DENABLE_MAINTENER"
AC_MSG_RESULT(yes)
maintener="yes"
],
[
AC_MSG_RESULT(no)
maintener="no"
]
)

AM_CONDITIONAL(MAINTENER_CODE, test x$maintener = xyes)



if test $ac_cv_header_portaudio_h = no; then
   AC_MSG_ERROR([*** missing portaudio.h. You need a working PortAudio installation. See http://www.portaudio.com])
fi
jpbl's avatar
jpbl committed
115 116 117 118 119 120
portaudio_LIBS="-lportaudio "
portaudio_CFLAGS="-DAUDIO_PORTAUDIO "
SFLPHONE_LIBS="$SFLPHONE_LIBS $portaudio_LIBS"
SFLPHONE_CXXFLAGS=="$SFLPHONE_CXXFLAGS $portaudio_CFLAGS"
AC_SUBST(portaudio_CFLAGS)
AC_SUBST(portaudio_LIB)
jpbl's avatar
jpbl committed
121 122 123 124 125 126 127

AC_SUBST(SFLPHONE_CXXFLAGS)
AC_SUBST(SFLPHONE_LIBS)
	

dnl AC_CONFIG_FILES(
AC_OUTPUT(
jpbl's avatar
jpbl committed
128
sflphone.spec \
jpbl's avatar
jpbl committed
129 130 131 132
Makefile \
src/Makefile \
src/audio/Makefile \
src/audio/gsm/Makefile \
jpbl's avatar
jpbl committed
133 134 135 136 137
src/audio/pacpp/Makefile \
src/audio/pacpp/include/Makefile \
src/audio/pacpp/include/portaudiocpp/Makefile \
src/audio/pacpp/source/Makefile \
src/audio/pacpp/source/portaudiocpp/Makefile \
jpbl's avatar
jpbl committed
138 139 140 141 142 143 144 145
src/gui/Makefile \
src/gui/qt/Makefile \
stund/Makefile \
pixmaps/Makefile \
skins/Makefile \
skins/emetal/Makefile \
skins/metal/Makefile \
rings/Makefile \
llea's avatar
llea committed
146
utilspp/Makefile \
jpbl's avatar
jpbl committed
147
)