source: trunk/third/gnomemeeting/configure.in @ 21124

Revision 21124, 16.2 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21123, which included commits to RCS files with non-trunk default branches.
Line 
1AC_INIT(gnomemeeting, 1.0.2, http://bugzilla.gnome.org/enter_bug.cgi?product=gnomemeeting)
2AC_CANONICAL_TARGET
3AC_PREREQ(2.53)
4AC_CONFIG_SRCDIR(src/gnomemeeting.cpp)
5AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
6
7AM_MAINTAINER_MODE
8AM_CONFIG_HEADER(config.h)
9
10
11dnl ###########################################################################
12dnl   GnomeMeeting Version
13dnl ###########################################################################
14
15MAJOR_VERSION=1
16MINOR_VERSION=0
17BUILD_TYPE=ReleaseCode
18BUILD_NUMBER=2
19
20AC_DEFINE_UNQUOTED(MAJOR_VERSION, $MAJOR_VERSION,[fix])
21AC_DEFINE_UNQUOTED(MINOR_VERSION, $MINOR_VERSION,[fix])
22AC_DEFINE_UNQUOTED(BUILD_TYPE, $BUILD_TYPE,[fix])
23AC_DEFINE_UNQUOTED(BUILD_NUMBER, $BUILD_NUMBER,[fix])
24
25
26dnl ###########################################################################
27dnl   Misc
28dnl ###########################################################################
29
30AC_PROG_INTLTOOL([0.20])
31
32AM_PROG_LIBTOOL
33
34AC_PROG_CC
35AC_PROG_CXX
36AC_ISC_POSIX
37AC_HEADER_STDC
38
39AC_CHECK_DECLS(strcasecmp)
40
41
42dnl ###########################################################################
43dnl   This is to check correct gconf installation
44dnl ###########################################################################
45SCHEMA_AGE=47
46AC_SUBST(SCHEMA_AGE)
47
48
49dnl ###########################################################################
50dnl GConf related settings
51dnl ###########################################################################
52AM_GCONF_SOURCE_2
53
54
55dnl ###########################################################################
56dnl PKG_CONFIG and required versions
57dnl ###########################################################################
58PKG_CHECK_MODULES(GNOMEMEETING, gtk+-2.0 >= 2.0.6 esound >= 0.2.28 gconf-2.0 >= 1.2.1 libxml-2.0 >= 2.5.0 libgnome-2.0 >= 2.0.0 libgnomeui-2.0 >= 2.0.0)
59
60OPENH323_REC_VERSION="1.13.4"
61PWLIB_REC_VERSION="1.6.5"
62
63
64dnl ###########################################################################
65dnl Scrollkeeper
66dnl ###########################################################################
67AC_PATH_PROG(SK_CONFIG,scrollkeeper-config,no)
68if test x$SK_CONFIG = xno; then
69AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package: http://scrollkeeper.sourceforge.net)
70fi
71
72
73dnl ###########################################################################
74dnl Set up Operating System specific parameters and endianess
75dnl ###########################################################################
76
77dnl Check the OS type (more types can be added)
78AC_MSG_CHECKING(whether OS type is supported)
79
80case $target_os in
81
82  linux-gnu | linux | Linux)
83    ARCH_OPENH323_CFLAGS="-DPTRACING -DNDEBUG -Wall -Os -g"
84    ARCH_OPENH323_LIBS="-lopenh323 -ldl -lpt -lpthread"
85    AC_MSG_RESULT([yes])
86    gm_platform="linux"
87
88dnl if debug add this and link to -lh323_linux_x86_d -lpt_linux_x86_d
89dnl -D_DEBUG -DPMEMORY_CHECK=1 -DPTRACING -g
90    ;;
91
92  FreeBSD* | freebsd* )
93    ARCH_OPENH323_CFLAGS="-Os -Wall -DPTRACING -DNDEBUG -DSTATIC_LIBS_USED"
94    ARCH_OPENH323_LIBS="-lh323_FreeBSD_x86_r_s -lpt_FreeBSD_x86_r_s -pthread -lssl -lcrypto"
95    AC_MSG_RESULT([yes])
96    gm_platform="freebsd"
97    ;;
98
99  darwin* )
100    ARCH_OPENH323_CFLAGS="-Os -Wall -DPTRACING -DNDEBUG -DNO_LONG_DOUBLE -DSTATIC_LIBS_USED"
101    ARCH_OPENH323_LIBS="-multiply_defined suppress -lh323_Darwin_ppc_r_s -lpt_Darwin_ppc_r_s -lssl -lcrypto -lX11 -framework AudioToolbox -framework CoreAudio -framework CoreServices"
102    AC_MSG_RESULT([yes])
103    gm_platform="macosx"
104    ;;
105
106  *)
107    AC_MSG_ERROR(Only Linux, FreeBSD and Mac OS X are supported. Please contact the author to know how you can add more OS types.)
108    ;;
109esac
110
111
112dnl ###########################################################################
113dnl  Check for library path
114dnl ###########################################################################
115case $host in
116
117*-*-linux*)
118  # Test if the compiler is 64bit
119  echo 'int i;' > conftest.$ac_ext
120  gnomemeeting_cv_cc_64bit_output=no
121
122  if AC_TRY_EVAL(ac_compile); then
123    case `/usr/bin/file conftest.$ac_objext` in
124
125    *"ELF 64"*)
126    gnomemeeting_cv_cc_64bit_output=yes     
127    ;;
128   
129    esac
130  fi
131
132  rm -rf conftest* 
133;;
134esac
135
136case $host_cpu:$gnomemeeting_cv_cc_64bit_output in
137powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
138libname="lib64" 
139;;
140*:*) 
141libname="lib" 
142;;
143esac
144
145
146dnl ###########################################################################
147dnl Check for pthreads library
148dnl ###########################################################################
149AC_CHECK_LIB(pthread, pthread_create, HAS_PTHREADS=yes, HAS_PTHREADS=no)
150if test ${HAS_PTHREADS} != yes ; then
151  AC_MSG_ERROR(must have pthreads!)
152fi
153
154
155dnl ###########################################################################
156dnl Enable debugging support
157dnl ###########################################################################
158AC_ARG_ENABLE(enable_debug,
159        [  --enable-debug        Enable debugging in GnomeMeeting (OpenH323 and PWLib must be compiled with debugging enabled])
160
161AC_MSG_CHECKING(whether debugging must be compiled in)
162if test x"$enable_debug" = xyes ; then
163   H323_CFLAGS="$H323_CFLAGS -D_DEBUG"
164   AC_MSG_RESULT([yes])
165else
166   H323_CFLAGS="$H323_CFLAGS -DNDEBUG"
167   AC_MSG_RESULT([no])
168fi
169
170
171dnl ###########################################################################
172dnl PWLib Headers and Libraries
173dnl ###########################################################################
174AC_ARG_WITH(pwlib-dir, [  --with-pwlib-dir=PFX   Location of PWLib], with_pwlib_dir="$withval", with_pwlib_dir="/usr")
175
176dnl Check for the includes presence
177AC_MSG_CHECKING(for PWLib includes in ${with_pwlib_dir}/include/)
178AC_MSG_RESULT()
179
180CPPFLAGS_save="$CPPFLAGS"
181CPPFLAGS="$CPPFLAGS -I${with_pwlib_dir}/include/ptlib"
182AC_CHECK_FILE(${with_pwlib_dir}/include/ptlib/pprocess.h, pwlib_includes="yes", pwlib_includes="no")
183CPPFLAGS="$CPPFLAGS_save"
184       
185if test "x${pwlib_includes}" != "xno" ; then
186        PWLIB_CFLAGS="-I${with_pwlib_dir}/include/ptlib -I${with_pwlib_dir}/include/ptclib"
187        if test "x${with_pwlib_dir}" != "x/usr"; then
188                PWLIB_CFLAGS="${PWLIB_CFLAGS} -I${with_pwlib_dir}/include"
189        fi     
190else
191        AC_MSG_ERROR(You need the PWLib headers to compile GnomeMeeting)
192fi
193
194dnl Checking for the library presence
195LIBS_save="$LIBS"
196LIBS="${LIBS} -L${with_pwlib_dir}/${libname}/"
197AC_CHECK_LIB(pt, main, pwlib_libs="yes", pwlib_libs="no")
198LIBS="${LIBS_save}"
199
200if test "x${pwlib_libs}" != "xno"; then
201        if test "x${with_pwlib_dir}" != "x/usr"; then
202                PWLIB_LIBS="-L${with_pwlib_dir}/${libname}"
203        fi
204else
205        AC_MSG_ERROR(You need the PWLib library to compile GnomeMeeting)
206fi
207
208dnl Checking for PWLib version
209AC_MSG_CHECKING(for PWLib version);
210PWLIB_VERSION=`cat ${with_pwlib_dir}/include/ptbuildopts.h | grep VERSION | cut -f2 -d ' ' | sed "s/\"//g"`
211AC_MSG_RESULT($PWLIB_VERSION)
212if test "x${PWLIB_VERSION}" != "x${PWLIB_REC_VERSION}"; then
213        AC_MSG_ERROR(Sorry but the recommended PWLib version is ${PWLIB_REC_VERSION});
214fi
215
216dnl Checking for OpenLDAP support in PWLIB
217AC_MSG_CHECKING(for OpenLDAP support in PWLIB);
218PWLIB_LDAP_SUPPORT=`cat ${with_pwlib_dir}/include/ptbuildopts.h | grep "#define P_LDAP 1" | cut -f3  -d ' '`
219if test "x${PWLIB_LDAP_SUPPORT}" != "x1"; then
220        AC_MSG_RESULT(no);
221        AC_MSG_ERROR(Sorry but the PWLib version you are using doesn't support LDAP);
222else
223        AC_MSG_RESULT(yes);
224fi
225
226dnl Check for ptlib-config
227AC_CHECK_FILE(${with_pwlib_dir}/bin/ptlib-config, HAS_PTLIB_CONFIG=1)
228if test "x${HAS_PTLIB_CONFIG}" != "x1" ; then
229        AC_MSG_ERROR(Sorry but ptlib-config can not be found, please check your installation);
230else
231        AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , ${with_pwlib_dir}/bin/)
232fi
233ARCH_OPENH323_CFLAGS="$ARCH_OPENH323_CFLAGS `$PTLIB_CONFIG --ccflags`"
234                 
235
236dnl ###########################################################################
237dnl OpenH323 Headers and Libraries
238dnl ###########################################################################
239AC_ARG_WITH(openh323-dir, [  --with-openh323-dir=PFX   Location of OpenH323], with_openh323_dir="$withval", with_openh323_dir="/usr")
240
241dnl Check for the includes presence
242AC_MSG_CHECKING(for Openh323 includes in ${with_openh323_dir}/include/)
243AC_MSG_RESULT()
244
245CPPFLAGS_save="$CPPFLAGS"
246CPPFLAGS="$CPPFLAGS -I${with_openh323_dir}/include"
247AC_CHECK_FILE(${with_openh323_dir}/include/openh323/h323.h, openh323_includes="yes", openh323_includes="no")
248CPPFLAGS="$CPPFLAGS_save"
249       
250if test "x${openh323_includes}" != "xno" ; then
251        OPENH323_CFLAGS="-I${with_openh323_dir}/include/openh323"
252else
253        AC_MSG_ERROR(You need the Openh323 headers to compile GnomeMeeting)
254fi
255
256dnl Checking for the library presence
257LIBS_save="$LIBS"
258LIBS="${LIBS} -L${with_openh323_dir}/${libname}/ -L${with_pwlib_dir}/${libname}/ -lpt"
259AC_CHECK_LIB(openh323, main, openh323_libs="yes", openh323_libs="yes")
260LIBS="${LIBS_save}"
261
262if test "x${openh323_libs}" != "xno"; then
263        if test "x${with_openh323_dir}" != "x/usr"; then
264                OPENH323_LIBS="-L${with_openh323_dir}/lib"
265        fi
266else
267        AC_MSG_ERROR(You need the Openh323 library to compile GnomeMeeting)
268fi
269
270dnl Checking for Openh323 version
271AC_MSG_CHECKING(for Openh323 version);
272OPENH323_VERSION=`cat ${with_openh323_dir}/include/openh323/openh323buildopts.h | grep VERSION | cut -f2 -d ' ' | sed "s/\"//g"`
273AC_MSG_RESULT($OPENH323_VERSION)
274if test "x${OPENH323_VERSION}" != "x${OPENH323_REC_VERSION}"; then
275        AC_MSG_ERROR(Sorry but the recommended Openh323 version is ${OPENH323_REC_VERSION});
276fi
277
278dnl Checking for plugins support in PWLIB
279AC_MSG_CHECKING(for Quicknet support in OpenH323);
280OPENH323_IXJ_SUPPORT=`cat ${with_openh323_dir}/include/openh323/openh323buildopts.h | grep "HAS_IXJ 1" | cut -f2  -d ' '`
281if test "x${OPENH323_IXJ_SUPPORT}" != "x1"; then
282        AC_MSG_RESULT(no);
283        AC_MSG_ERROR(Sorry but the OpenH323 version you are using doesn't support Quicknet devices);
284else
285        AC_MSG_RESULT(yes);
286        HAS_IXJ="enabled";
287fi
288
289
290dnl ###########################################################################
291dnl   Check for SDL
292dnl ###########################################################################
293
294dnl SDL does not work on Mac OS X yet, so disable it
295if test ${gm_platform} = "macosx" ; then
296        HAS_SDL="disabled"
297        AC_MSG_WARN([*** SDL cannot be used on Mac OS X. Fullscreen mode will be disabled])
298
299else
300
301        SDL_VERSION=1.2.4
302        SDL_HAS_SDL=
303        AM_PATH_SDL($SDL_VERSION,
304                    SDL_HAS_SDL="-DHAS_SDL",
305                    AC_MSG_WARN([*** SDL version $SDL_VERSION not found!. Fullscreen mode will be disabled]))
306        SDL_CFLAGS="$SDL_CFLAGS $SDL_HAS_SDL"
307        SDL_LDFLAGS="$LIBS $SDL_LIBS"
308
309        if test "x${SDL_HAS_SDL}" = "x-DHAS_SDL" ; then
310                HAS_SDL="enabled"
311        else 
312                HAS_SDL="disabled"
313        fi
314fi
315
316
317dnl ###########################################################################
318dnl LDAP Headers and Libraries
319dnl ###########################################################################
320AC_ARG_WITH(ldap-dir, [  --with-ldap-dir=PFX   Location of LDAP], with_ldap_dir="$withval", with_ldap_dir="/usr")
321
322dnl Check for the includes presence
323AC_MSG_CHECKING(for LDAP includes in ${with_ldap_dir}/include/)
324AC_MSG_RESULT()
325
326CPPFLAGS_save="$CPPFLAGS"
327CPPFLAGS="$CPPFLAGS -I${with_ldap_dir}/include"
328AC_CHECK_FILE(${with_ldap_dir}/include/ldap.h, ldap_includes="yes", ldap_includes="no")
329CPPFLAGS="$CPPFLAGS_save"
330       
331if test "x${ldap_includes}" != "xno" ; then
332        LDAP_CFLAGS="-I${with_ldap_dir}/include"
333else
334        AC_MSG_ERROR(You need the LDAP headers to compile GnomeMeeting)
335fi
336
337dnl Checking for the library presence
338LIBS_save="$LIBS"
339LIBS="${LIBS} -L${with_ldap_dir}/${libname}/ -llber"
340AC_CHECK_LIB(ldap, main, ldap_libs="yes", ldap_libs="no")
341LIBS="${LIBS_save}"
342
343if test "x${ldap_libs}" != "xno"; then
344        LDAP_LIBS="-llber -lldap"
345        if test "x${with_ldap_dir}" != "x/usr"; then
346                LDAP_LIBS="-L${with_ldap_dir}/${libname} $LDAP_LIBS"
347        fi
348else
349        AC_MSG_ERROR(You need the LDAP library to compile GnomeMeeting)
350fi
351
352dnl Checking for libresolv
353if test ${gm_platform} = "linux" ; then
354        AC_CHECK_LIB(resolv, res_gethostbyaddr, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([*** libresolv not found.]), -lresolv)
355        LDAP_LIBS="${LDAP_LIBS} -lresolv"
356fi
357
358
359dnl ######################################################################### 
360dnl  Check for recent libxml2 which has xmlRegisterNodeDefault()
361dnl ########################################################################   
362AC_CHECK_LIB(xml2, xmlFreeDoc)
363AC_CHECK_FUNCS(xmlRegisterNodeDefault)
364
365
366dnl ########################################################################   
367dnl  libxml path is in GNOMEMEETING_CFLAGS due to pkg-config
368dnl ########################################################################   
369CPPFLAGS_save="$CPPFLAGS"
370CPPFLAGS="$CPPFLAGS $GNOMEMEETING_CFLAGS"
371AC_CHECK_TYPES(xmlSAXHandlerV1,,, [#include <libxml/SAX.h>])
372CPPFLAGS="$CPPFLAGS_save"
373
374
375dnl ###########################################################################
376dnl  The various CFLAGS are merged into GNOMEMEETING_CFLAGS and
377dnl  GNOMEMEETING_LIB_CFLAGS
378dnl ###########################################################################
379GNOMEMEETING_LIB_CFLAGS="$GNOMEMEETING_CFLAGS"
380GNOMEMEETING_CFLAGS="$GNOMEMEETING_CFLAGS $PWLIB_CFLAGS $LDAP_INCLUDES $OPENH323_CFLAGS $SDL_CFLAGS $LDAP_CFLAGS $ARCH_OPENH323_CFLAGS"
381GNOMEMEETING_LIBS="$GNOMEMEETING_LIBS $PWLIB_LIBS $OPENH323_LIBS $LDAP_LIBS $SDL_LDFLAGS $ARCH_OPENH323_LIBS"
382CFLAGS=""
383
384
385dnl ###########################################################################
386dnl For the static library
387dnl ###########################################################################
388AC_SUBST(GNOMEMEETING_LIB_CFLAGS)
389
390
391dnl #########################################################################
392dnl  Support for internationalization
393dnl ########################################################################
394ALL_LINGUAS="am ar az be bn ca cs cy da de el en_CA en_GB es fi fr ga gl hi hr hu it ja ko lt lv mk ml mn mr ms nl no pa pl pt pt_BR ro ru sk sq sr sr@Latn sv ta tr uk vi wa zh_CN zh_TW"
395
396GETTEXT_PACKAGE=gnomemeeting
397AC_SUBST(GETTEXT_PACKAGE)
398AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[fix])
399AM_GLIB_GNU_GETTEXT
400
401
402AC_SUBST(GNOMEMEETING_LDADD)
403AC_SUBST(GNOMEMEETING_CFLAGS)
404
405
406dnl #########################################################################
407dnl Set PACKAGE_LOCALE_DIR in config.h.
408dnl #########################################################################
409if test "x${prefix}" = "xNONE"; then
410  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${ac_default_prefix}/${DATADIRNAME}/locale",[fix])
411else
412  AC_DEFINE_UNQUOTED(PACKAGE_LOCALE_DIR, "${prefix}/${DATADIRNAME}/locale",[fix])
413fi
414
415
416dnl ###########################################################################
417dnl  Data and configuration directories for the system
418dnl ###########################################################################
419gnomedatadir=`eval "echo ${datadir}"`
420gnomeconfdir=`eval "echo ${sysconfdir}"`
421                                                                                AC_SUBST(gnomedatadir)
422AC_SUBST(gnomeconfdir)
423                                                                                       
424dnl ###########################################################################
425dnl  Output the different Makefiles
426dnl ###########################################################################
427AC_OUTPUT(
428Makefile
429src/gnomemeeting-config-tool
430gnomemeeting.schemas.in
431lib/Makefile
432lib/widgets/Makefile
433lib/xdap/Makefile
434po/Makefile.in
435man/Makefile
436src/Makefile
437pixmaps/Makefile
438sounds/Makefile
439xdap_data/Makefile
440help/Makefile
441help/C/Makefile)
442
443
444dnl ###########################################################################
445dnl Summary
446dnl ###########################################################################
447
448echo ""
449echo "================ Final configuration ==================="
450echo "          Installing into prefix  :  $prefix"
451echo ""
452echo "             OpenH323 Version is  :  $OPENH323_REC_VERSION"
453echo "           OpenH323 Directory is  :  $with_openh323_dir"
454echo "                PWLIB Version is  :  $PWLIB_REC_VERSION"
455echo "              PWLIB Directory is  :  $with_pwlib_dir"
456echo "                 ptlib-config is  :  $with_pwlib_dir/bin/ptlib-config"
457echo ""
458echo "                Quicknet support  :  $HAS_IXJ"
459echo "          SDL Fullscreen support  :  $HAS_SDL"
460echo ""
461echo "                         OS Type  :  $target_os"
462echo "                    Machine Type  :  $target_cpu"
463echo ""
464echo " If all settings are OK, type make and make install "
465echo "========================================================"
Note: See TracBrowser for help on using the repository browser.