# HG changeset patch # User Sean Egan # Date 1131523116 0 # Node ID 80faf1ca52806ea5fbfe744fd8ea385337f2628a # Parent 9d562dde0a3aa63ed1191f39bf1e5a662803f4a0 [gaim-migrate @ 14316] boo committer: Tailor Script diff -r 9d562dde0a3a -r 80faf1ca5280 m4/.cvsignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/.cvsignore Wed Nov 09 07:58:36 2005 +0000 @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff -r 9d562dde0a3a -r 80faf1ca5280 m4/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/Makefile.am Wed Nov 09 07:58:36 2005 +0000 @@ -0,0 +1,1 @@ +EXTRA_DIST = esd.m4 artsc.m4 ac_var_timezone_externals.m4 diff -r 9d562dde0a3a -r 80faf1ca5280 m4/ac_var_timezone_externals.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/ac_var_timezone_externals.m4 Wed Nov 09 07:58:36 2005 +0000 @@ -0,0 +1,38 @@ + +# Define 'timezone', 'altzone' and 'daylight' +# http://www.gnu.org/software/ac-archive/Miscellaneous/ac_var_timezone_externals.html +# Use instead of 'AC_STRUCT_TIMEZONE' to determine whether the +# the external timezone variables 'timezone', 'altzone' and 'daylight' exist, +# defining 'HAVE_TIMEZONE', 'HAVE_ALTZONE' and 'HAVE_DAYLIGHT' respectively +# (as well as gaining the macros defined by 'AC_STRUCT_TIMEZONE'). +# Mark R.Bannister +AC_DEFUN([AC_VAR_TIMEZONE_EXTERNALS], +[ AC_REQUIRE([AC_STRUCT_TIMEZONE])dnl + AC_CACHE_CHECK(for timezone external, mb_cv_var_timezone, + [ AC_TRY_LINK([#include ], [return (int)timezone;], + mb_cv_var_timezone=yes, + mb_cv_var_timezone=no) + ]) + AC_CACHE_CHECK(for altzone external, mb_cv_var_altzone, + [ AC_TRY_LINK([#include ], [return (int)altzone;], + mb_cv_var_altzone=yes, + mb_cv_var_altzone=no) + ]) + AC_CACHE_CHECK(for daylight external, mb_cv_var_daylight, + [ AC_TRY_LINK([#include ], [return (int)daylight;], + mb_cv_var_daylight=yes, + mb_cv_var_daylight=no) + ]) + if test $mb_cv_var_timezone = yes; then + AC_DEFINE([HAVE_TIMEZONE], 1, + [Define if you have the external 'timezone' variable.]) + fi + if test $mb_cv_var_altzone = yes; then + AC_DEFINE([HAVE_ALTZONE], 1, + [Define if you have the external 'altzone' variable.]) + fi + if test $mb_cv_var_daylight = yes; then + AC_DEFINE([HAVE_DAYLIGHT], 1, + [Define if you have the external 'daylight' variable.]) + fi +]) diff -r 9d562dde0a3a -r 80faf1ca5280 m4/artsc.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/artsc.m4 Wed Nov 09 07:58:36 2005 +0000 @@ -0,0 +1,142 @@ +dnl Test for the ArtsC interface. + +AC_DEFUN([AM_PATH_ARTSC], +[ +AC_ARG_ENABLE(artsc-test, +[ --disable-artsc-test Do not compile and run a test ArtsC program.], +[artsc_test="yes"], +[artsc_test="no"]) + +dnl Search for the arts-config program. +AC_PATH_PROG(ARTSC_CONFIG, artsc-config, no) +min_artsc_version=ifelse([$1],,0.9.5,$1) +AC_MSG_CHECKING(for ArtsC - version >= $min_artsc_version) + +no_artsc="" +if test "x$ARTSC_CONFIG" != "xno"; then + ARTSC_CFLAGS=`$ARTSC_CONFIG --cflags` + ARTSC_LIBS=`$ARTSC_CONFIG --libs` + + artsc_major_version=`$ARTSC_CONFIG $artsc_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + artsc_minor_version=`$ARTSC_CONFIG $artsc_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + artsc_micro_version=`$ARTSC_CONFIG $artsc_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + # Test if a simple ArtsC program can be created. + if test "x$artsc_test" = "xyes"; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $ARTSC_CFLAGS" + LIBS="$LIBS $ARTSC_LIBS" + + rm -f conf.artsc + AC_TRY_RUN([ +#include +#include +#include + +#include + +char* +my_strdup(char *str) +{ + char *new_str; + + if (str) { + new_str = malloc((strlen(str) + 1) * sizeof(char)); + strcpy(new_str, str); + } else { + new_str = NULL; + } + + return new_str; +} + +int main() +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.artsc"); + + /* HP/UX 9 writes to sscanf strings */ + tmp_version = my_strdup("$min_artsc_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_artsc_version"); + exit(1); + } + + if (($artsc_major_version > major) || + (($artsc_major_version == major) && ($artsc_minor_version > minor)) || + (($artsc_major_version == major) && ($artsc_minor_version == minor) + && ($artsc_micro_version >= micro))) { + return 0; + } else { + printf("\n*** 'artsc-config --version' returned %d.%d.%d, but the minimum version\n", $artsc_major_version, $artsc_minor_version, $artsc_micro_version); + printf("*** of ARTSC required is %d.%d.%d. If artsc-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If artsc-config was wrong, set the environment variable ARTSC_CONFIG\n"); + printf("*** to point to the correct copy of artsc-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} +],, no_artsc=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi +else + no_artsc=yes +fi + +if test "x$no_artsc" != "xyes"; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) +else + AC_MSG_RESULT(no) + + if test "x$ARTSC_CONFIG" = "xno" ; then + echo "*** The artsc-config script installed by ArtsC could not be found" + echo "*** If ArtsC was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the ARTSC_CONFIG environment variable to the" + echo "*** full path to artsc-config." + else + if test -f conf.artsc ; then + : + else + echo "*** Could not run ArtsC test program, checking why..." + CFLAGS="$CFLAGS $ARTSC_CFLAGS" + LIBS="$LIBS $ARTSC_LIBS" + AC_TRY_LINK([ +#include +#include +],[return 0;], +[ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding ArtsC or finding the wrong" + echo "*** version of ArtsC. If it is not finding ArtsC, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means ArtsC was incorrectly installed" + echo "*** or that you have moved ArtsC since it was installed. In the latter case, you" + echo "*** may want to edit the artsc-config script: $ARTSC_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + ARTSC_CFLAGS="" + ARTSC_LIBS="" + ifelse([$3], , :, [$3]) +fi + +AC_SUBST(ARTSC_CFLAGS) +AC_SUBST(ARTSC_LIBS) +rm -f conf.artsc + +]) diff -r 9d562dde0a3a -r 80faf1ca5280 m4/esd.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/esd.m4 Wed Nov 09 07:58:36 2005 +0000 @@ -0,0 +1,164 @@ +# Configure paths for ESD +# Manish Singh 98-9-30 +# stolen back from Frank Belew +# stolen from Manish Singh +# Shamelessly stolen from Owen Taylor + +dnl AM_PATH_GESD([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) +dnl Test for ESD, and define ESD_CFLAGS and ESD_LIBS +dnl +AC_DEFUN(AM_PATH_GESD, +[dnl +dnl Get the cflags and libraries from the esd-config script +dnl +AC_ARG_WITH(esd-prefix,[ --with-esd-prefix=PFX Prefix where ESD is installed (optional)], + esd_prefix="$withval", esd_prefix="") +AC_ARG_WITH(esd-exec-prefix,[ --with-esd-exec-prefix=PFX Exec prefix where ESD is installed (optional)], + esd_exec_prefix="$withval", esd_exec_prefix="") +AC_ARG_ENABLE(esdtest, [ --disable-esdtest Do not try to compile and run a test ESD program], + , enable_esdtest=yes) + + if test x$esd_exec_prefix != x ; then + esd_args="$esd_args --exec-prefix=$esd_exec_prefix" + if test x${ESD_CONFIG+set} != xset ; then + ESD_CONFIG=$esd_exec_prefix/bin/esd-config + fi + fi + if test x$esd_prefix != x ; then + esd_args="$esd_args --prefix=$esd_prefix" + if test x${ESD_CONFIG+set} != xset ; then + ESD_CONFIG=$esd_prefix/bin/esd-config + fi + fi + + AC_PATH_PROG(ESD_CONFIG, esd-config, no) + min_esd_version=ifelse([$1], ,0.2.7,$1) + AC_MSG_CHECKING(for ESD - version >= $min_esd_version) + no_esd="" + if test "$ESD_CONFIG" = "no" ; then + no_esd=yes + else + ESD_CFLAGS=`$ESD_CONFIG $esdconf_args --cflags` + ESD_LIBS=`$ESD_CONFIG $esdconf_args --libs` + + esd_major_version=`$ESD_CONFIG $esd_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + esd_minor_version=`$ESD_CONFIG $esd_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + esd_micro_version=`$ESD_CONFIG $esd_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + if test "x$enable_esdtest" = "xyes" ; then + ac_save_CFLAGS="$CFLAGS" + ac_save_LIBS="$LIBS" + CFLAGS="$CFLAGS $ESD_CFLAGS" + LIBS="$LIBS $ESD_LIBS" +dnl +dnl Now check if the installed ESD is sufficiently new. (Also sanity +dnl checks the results of esd-config to some extent +dnl + rm -f conf.esdtest + AC_TRY_RUN([ +#include +#include +#include +#include + +char* +my_strdup (char *str) +{ + char *new_str; + + if (str) + { + new_str = malloc ((strlen (str) + 1) * sizeof(char)); + strcpy (new_str, str); + } + else + new_str = NULL; + + return new_str; +} + +int main () +{ + int major, minor, micro; + char *tmp_version; + + system ("touch conf.esdtest"); + + /* HP/UX 9 (%@#!) writes to sscanf strings */ + tmp_version = my_strdup("$min_esd_version"); + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { + printf("%s, bad version string\n", "$min_esd_version"); + exit(1); + } + + if (($esd_major_version > major) || + (($esd_major_version == major) && ($esd_minor_version > minor)) || + (($esd_major_version == major) && ($esd_minor_version == minor) && ($esd_micro_version >= micro))) + { + return 0; + } + else + { + printf("\n*** 'esd-config --version' returned %d.%d.%d, but the minimum version\n", $esd_major_version, $esd_minor_version, $esd_micro_version); + printf("*** of ESD required is %d.%d.%d. If esd-config is correct, then it is\n", major, minor, micro); + printf("*** best to upgrade to the required version.\n"); + printf("*** If esd-config was wrong, set the environment variable ESD_CONFIG\n"); + printf("*** to point to the correct copy of esd-config, and remove the file\n"); + printf("*** config.cache before re-running configure\n"); + return 1; + } +} + +],, no_esd=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + if test "x$no_esd" = x ; then + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT(no) + if test "$ESD_CONFIG" = "no" ; then + echo "*** The esd-config script installed by ESD could not be found" + echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in" + echo "*** your path, or set the ESD_CONFIG environment variable to the" + echo "*** full path to esd-config." + else + if test -f conf.esdtest ; then + : + else + echo "*** Could not run ESD test program, checking why..." + CFLAGS="$CFLAGS $ESD_CFLAGS" + LIBS="$LIBS $ESD_LIBS" + AC_TRY_LINK([ +#include +#include +], [ return 0; ], + [ echo "*** The test program compiled, but did not run. This usually means" + echo "*** that the run-time linker is not finding ESD or finding the wrong" + echo "*** version of ESD. If it is not finding ESD, you'll need to set your" + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" + echo "*** to the installed location Also, make sure you have run ldconfig if that" + echo "*** is required on your system" + echo "***" + echo "*** If you have an old version installed, it is best to remove it, although" + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"], + [ echo "*** The test program failed to compile or link. See the file config.log for the" + echo "*** exact error that occured. This usually means ESD was incorrectly installed" + echo "*** or that you have moved ESD since it was installed. In the latter case, you" + echo "*** may want to edit the esd-config script: $ESD_CONFIG" ]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" + fi + fi + ESD_CFLAGS="" + ESD_LIBS="" + ifelse([$3], , :, [$3]) + fi + AC_SUBST(ESD_CFLAGS) + AC_SUBST(ESD_LIBS) + rm -f conf.esdtest +]) diff -r 9d562dde0a3a -r 80faf1ca5280 m4/exosip.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/exosip.m4 Wed Nov 09 07:58:36 2005 +0000 @@ -0,0 +1,57 @@ +AC_DEFUN([LP_SETUP_EXOSIP],[ +AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([LP_CHECK_OSIP2]) + +dnl eXosip embeded stuff +EXOSIP_CFLAGS="$OSIP_CFLAGS -DHAVE_PTHREAD -DOSIP_MT -DENABLE_TRACE -DNEW_TIMER -DSM -DMSN_SUPPORT -DUSE_TMP_BUFFER" +EXOSIP_LIBS="$OSIP_LIBS" +AC_CHECK_HEADERS(semaphore.h) +AC_CHECK_HEADERS(sys/sem.h) +case $target in + linux*) + EXOSIP_CFLAGS="$EXOSIP_CFLAGS -pedantic" + ;; + irix*) + ;; + hpux* | hp-ux*) + ;; + aix*) + ;; + osf*) + AC_CHECK_LIB(rt,sem_open,[EXOSIP_LIBS="$EXOSIP_LIBS -lrt"]) + ;; + sunos*) + ;; + darwin*) + EXOSIP_CFLAGS="$EXOSIP_CFLAGS -pedantic" + ;; + *) + ;; +esac + +AC_CHECK_LIB(posix4,sem_open,[EXOSIP_LIBS="$EXOSIP_LIBS -lposix4 -mt"]) +AC_CHECK_LIB(nsl,nis_add,[EXOSIP_LIBS="$EXOSIP_LIBS -lnsl"]) +AC_CHECK_LIB(socket,sendto,[EXOSIP_LIBS="$EXOSIP_LIBS -lsocket"]) +AC_CHECK_LIB(rt,clock_gettime,[EXOSIP_LIBS="$EXOSIP_LIBS -lrt"]) +dnl Checks for header files. +AC_HEADER_STDC +AC_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_SUBST(EXOSIP_CFLAGS) +AC_SUBST(EXOSIP_LIBS) +]) diff -r 9d562dde0a3a -r 80faf1ca5280 m4/gnome-gnorba-check.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/gnome-gnorba-check.m4 Wed Nov 09 07:58:36 2005 +0000 @@ -0,0 +1,35 @@ +dnl +dnl GNOME_GNORBA_HOOK (script-if-gnorba-found, failflag) +dnl +dnl if failflag is "failure" it aborts if gnorba is not found. +dnl + +AC_DEFUN([GNOME_GNORBA_HOOK],[ + GNOME_ORBIT_HOOK([],$2) + AC_CACHE_CHECK([for gnorba libraries],gnome_cv_gnorba_found,[ + gnome_cv_gnorba_found=no + if test x$gnome_cv_orbit_found = xyes; then + GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" + GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" + if test -n "$GNORBA_LIBS"; then + gnome_cv_gnorba_found=yes + fi + fi + ]) + AM_CONDITIONAL(HAVE_GNORBA, test x$gnome_cv_gnorba_found = xyes) + if test x$gnome_cv_orbit_found = xyes; then + $1 + GNORBA_CFLAGS="`gnome-config --cflags gnorba gnomeui`" + GNORBA_LIBS="`gnome-config --libs gnorba gnomeui`" + AC_SUBST(GNORBA_CFLAGS) + AC_SUBST(GNORBA_LIBS) + else + if test x$2 = xfailure; then + AC_MSG_ERROR(gnorba library not installed or installation problem) + fi + fi +]) + +AC_DEFUN([GNOME_GNORBA_CHECK], [ + GNOME_GNORBA_HOOK([],failure) +]) diff -r 9d562dde0a3a -r 80faf1ca5280 m4/gnome-orbit-check.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/gnome-orbit-check.m4 Wed Nov 09 07:58:36 2005 +0000 @@ -0,0 +1,33 @@ +dnl +dnl GNOME_ORBIT_HOOK (script-if-orbit-found, failflag) +dnl +dnl if failflag is "failure" it aborts if orbit is not found. +dnl + +AC_DEFUN([GNOME_ORBIT_HOOK],[ + AC_PATH_PROG(ORBIT_CONFIG,orbit-config,no) + AC_PATH_PROG(ORBIT_IDL,orbit-idl,no) + AC_CACHE_CHECK([for working ORBit environment],gnome_cv_orbit_found,[ + if test x$ORBIT_CONFIG = xno -o x$ORBIT_IDL = xno; then + gnome_cv_orbit_found=no + else + gnome_cv_orbit_found=yes + fi + ]) + AM_CONDITIONAL(HAVE_ORBIT, test x$gnome_cv_orbit_found = xyes) + if test x$gnome_cv_orbit_found = xyes; then + $1 + ORBIT_CFLAGS=`orbit-config --cflags client server` + ORBIT_LIBS=`orbit-config --use-service=name --libs client server` + AC_SUBST(ORBIT_CFLAGS) + AC_SUBST(ORBIT_LIBS) + else + if test x$2 = xfailure; then + AC_MSG_ERROR(ORBit not installed or installation problem) + fi + fi +]) + +AC_DEFUN([GNOME_ORBIT_CHECK], [ + GNOME_ORBIT_HOOK([],failure) +]) diff -r 9d562dde0a3a -r 80faf1ca5280 m4/gnome-pthread-check.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/gnome-pthread-check.m4 Wed Nov 09 07:58:36 2005 +0000 @@ -0,0 +1,16 @@ +dnl +dnl And better, use gthreads instead... +dnl + +AC_DEFUN([GNOME_PTHREAD_CHECK],[ + PTHREAD_LIB="" + AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIB="-lpthread", + [AC_CHECK_LIB(pthreads, pthread_create, PTHREAD_LIB="-lpthreads", + [AC_CHECK_LIB(c_r, pthread_create, PTHREAD_LIB="-lc_r", + [AC_CHECK_FUNC(pthread_create)] + )] + )] + ) + AC_SUBST(PTHREAD_LIB) + AC_PROVIDE([GNOME_PTHREAD_CHECK]) +]) diff -r 9d562dde0a3a -r 80faf1ca5280 m4/gnome-x-checks.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/gnome-x-checks.m4 Wed Nov 09 07:58:36 2005 +0000 @@ -0,0 +1,80 @@ +dnl GNOME_X_CHECKS +dnl +dnl Basic X11 related checks for X11. At the end, the following will be +dnl defined/changed: +dnl GTK_{CFLAGS,LIBS} From AM_PATH_GTK +dnl CPPFLAGS Will include $X_CFLAGS +dnl GNOME_HAVE_SM `true' or `false' depending on whether session +dnl management is available. It is available if +dnl both -lSM and X11/SM/SMlib.h exist. (Some +dnl Solaris boxes have the library but not the header) +dnl XPM_LIBS -lXpm if Xpm library is present, otherwise "" +dnl +dnl The following configure cache variables are defined (but not used): +dnl gnome_cv_passdown_{x_libs,X_LIBS,X_CFLAGS} +dnl +AC_DEFUN([GNOME_X_CHECKS], +[ + AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path)) + dnl Hope that GTK_CFLAGS have only -I and -D. Otherwise, we could + dnl test -z "$x_includes" || CPPFLAGS="$CPPFLAGS -I$x_includes" + dnl + dnl Use CPPFLAGS instead of CFLAGS because AC_CHECK_HEADERS uses + dnl CPPFLAGS, not CFLAGS + CPPFLAGS="$CPPFLAGS $GTK_CFLAGS" + + saved_ldflags="$LDFLAGS" + LDFLAGS="$LDFLAGS $GTK_LIBS" + + gnome_cv_passdown_x_libs="$GTK_LIBS" + gnome_cv_passdown_X_LIBS="$GTK_LIBS" + gnome_cv_passdown_X_CFLAGS="$GTK_CFLAGS" + gnome_cv_passdown_GTK_LIBS="$GTK_LIBS" + + LDFLAGS="$saved_ldflags $GTK_LIBS" + +dnl We are requiring GTK >= 1.1.1, which means this will be fine anyhow. + USE_DEVGTK=true + +dnl AC_MSG_CHECKING([whether to use features from (unstable) GTK+ 1.1.x]) +dnl AC_EGREP_CPP(answer_affirmatively, +dnl [#include +dnl #ifdef GTK_HAVE_FEATURES_1_1_0 +dnl answer_affirmatively +dnl #endif +dnl ], dev_gtk=yes, dev_gtk=no) +dnl if test "$dev_gtk" = "yes"; then +dnl USE_DEVGTK=true +dnl fi +dnl AC_MSG_RESULT("$dev_gtk") + + GNOME_HAVE_SM=true + case "$GTK_LIBS" in + *-lSM*) + dnl Already found it. + ;; + *) + dnl Assume that if we have -lSM then we also have -lICE. + AC_CHECK_LIB(SM, SmcSaveYourselfDone, + [GTK_LIBS="-lSM -lICE $GTK_LIBS"],GNOME_HAVE_SM=false, + $x_libs -lICE) + ;; + esac + + if test "$GNOME_HAVE_SM" = true; then + AC_CHECK_HEADERS(X11/SM/SMlib.h,,GNOME_HAVE_SM=false) + fi + + if test "$GNOME_HAVE_SM" = true; then + AC_DEFINE(HAVE_LIBSM) + fi + + XPM_LIBS="" + AC_CHECK_LIB(Xpm, XpmFreeXpmImage, [XPM_LIBS="-lXpm"], , $x_libs) + AC_SUBST(XPM_LIBS) + + AC_REQUIRE([GNOME_PTHREAD_CHECK]) + LDFLAGS="$saved_ldflags" + + AC_PROVIDE([GNOME_X_CHECKS]) +]) diff -r 9d562dde0a3a -r 80faf1ca5280 m4/gnome.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/gnome.m4 Wed Nov 09 07:58:36 2005 +0000 @@ -0,0 +1,125 @@ +dnl +dnl GNOME_INIT_HOOK (script-if-gnome-enabled, [failflag], [additional-inits]) +dnl +dnl if failflag is "fail" then GNOME_INIT_HOOK will abort if gnomeConf.sh +dnl is not found. +dnl + +AC_DEFUN([GNOME_INIT_HOOK],[ + AC_SUBST(GNOME_LIBS) + AC_SUBST(GNOMEUI_LIBS) + AC_SUBST(GNOMEGNORBA_LIBS) + AC_SUBST(GTKXMHTML_LIBS) + AC_SUBST(ZVT_LIBS) + AC_SUBST(GNOME_LIBDIR) + AC_SUBST(GNOME_INCLUDEDIR) + + AC_ARG_WITH(gnome-includes, + [ --with-gnome-includes Specify location of GNOME headers],[ + CFLAGS="$CFLAGS -I$withval" + ]) + + AC_ARG_WITH(gnome-libs, + [ --with-gnome-libs Specify location of GNOME libs],[ + LDFLAGS="$LDFLAGS -L$withval" + gnome_prefix=$withval + ]) + + AC_ARG_WITH(gnome, + [ --with-gnome Specify prefix for GNOME files], + if test x$withval = xyes; then + want_gnome=yes + dnl Note that an empty true branch is not + dnl valid sh syntax. + ifelse([$1], [], :, [$1]) + else + if test "x$withval" = xno; then + want_gnome=no + else + want_gnome=yes + LDFLAGS="$LDFLAGS -L$withval/lib" + CFLAGS="$CFLAGS -I$withval/include" + gnome_prefix=$withval/lib + fi + fi, + want_gnome=yes) + + GNOME_GNORBA_HOOK([],$2) + + if test "x$want_gnome" = xyes; then + + AC_PATH_PROG(GNOME_CONFIG,gnome-config,no) + if test "$GNOME_CONFIG" = "no"; then + no_gnome_config="yes" + else + AC_MSG_CHECKING(if $GNOME_CONFIG works) + if $GNOME_CONFIG --libs-only-l gnome >/dev/null 2>&1; then + AC_MSG_RESULT(yes) + GNOME_LIBS="`$GNOME_CONFIG --libs-only-l gnome`" + GNOMEUI_LIBS="`$GNOME_CONFIG --libs-only-l gnomeui`" + GNOMEGNORBA_LIBS="`$GNOME_CONFIG --libs-only-l gnorba gnomeui`" + GTKXMHTML_LIBS="`$GNOME_CONFIG --libs-only-l gtkxmhtml`" + ZVT_LIBS="`$GNOME_CONFIG --libs-only-l zvt`" + GNOME_LIBDIR="`$GNOME_CONFIG --libs-only-L gnorba gnomeui`" + GNOME_INCLUDEDIR="`$GNOME_CONFIG --cflags gnorba gnomeui`" + $1 + else + AC_MSG_RESULT(no) + no_gnome_config="yes" + fi + fi + + if test x$exec_prefix = xNONE; then + if test x$prefix = xNONE; then + gnome_prefix=$ac_default_prefix/lib + else + gnome_prefix=$prefix/lib + fi + else + gnome_prefix=`eval echo \`echo $libdir\`` + fi + + if test "$no_gnome_config" = "yes"; then + AC_MSG_CHECKING(for gnomeConf.sh file in $gnome_prefix) + if test -f $gnome_prefix/gnomeConf.sh; then + AC_MSG_RESULT(found) + echo "loading gnome configuration from" \ + "$gnome_prefix/gnomeConf.sh" + . $gnome_prefix/gnomeConf.sh + $1 + else + AC_MSG_RESULT(not found) + if test x$2 = xfail; then + AC_MSG_ERROR(Could not find the gnomeConf.sh file that is generated by gnome-libs install) + fi + fi + fi + fi + + if test -n "$3"; then + n="$3" + for i in $n; do + AC_MSG_CHECKING(extra library \"$i\") + case $i in + applets) + AC_SUBST(GNOME_APPLETS_LIBS) + GNOME_APPLETS_LIBS=`$GNOME_CONFIG --libs-only-l applets` + AC_MSG_RESULT($GNOME_APPLETS_LIBS);; + capplet) + AC_SUBST(GNOME_CAPPLET_LIBS) + GNOME_CAPPLET_LIBS=`$GNOME_CONFIG --libs-only-l capplet` + AC_MSG_RESULT($GNOME_CAPPLET_LIBS);; + *) + AC_MSG_RESULT(unknown library) + esac + done + fi +]) + +dnl +dnl GNOME_INIT ([additional-inits]) +dnl + +AC_DEFUN([GNOME_INIT],[ + GNOME_INIT_HOOK([],fail,$1) +]) diff -r 9d562dde0a3a -r 80faf1ca5280 m4/ilbc.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/ilbc.m4 Wed Nov 09 07:58:36 2005 +0000 @@ -0,0 +1,33 @@ +AC_DEFUN([LP_CHECK_ILBC],[ + +AC_ARG_WITH( ilbc, + [ --with-ilbc Set prefix where ilbc headers and libs can be found (ex:/usr, /usr/local, none to disable ilbc support) [default=/usr] ], + [ ilbc_prefix=${withval}],[ ilbc_prefix="/usr" ]) + +if test "$ilbc_prefix" = "none" ; then + AC_MSG_NOTICE([iLBC codec support disabled. ]) +else + ILBC_CFLAGS=" -I${ilbc_prefix}/include/ilbc" + ILBC_LIBS="-L${ilbc_prefix}/lib -lilbc -lm" + CPPFLAGS_save=$CPPFLAGS + CPPFLAGS=$ILBC_CFLAGS + LDFLAGS_save=$LDFLAGS + LDFLAGS=$ILBC_LIBS + AC_CHECK_HEADERS(iLBC_decode.h,[AC_CHECK_LIB(ilbc,iLBC_decode,ilbc_found=yes,ilbc_found=no) + ],ilbc_found=no) + + CPPFLAGS=$CPPFLAGS_save + LDFLAGS=$LDFLAGS_save + + if test "$ilbc_found" = "no" ; then + AC_MSG_WARN([Could not find ilbc headers or libs. Please install ilbc package from http://www.linphone.org if you want iLBC codec support in linphone.]) + ILBC_CFLAGS= + ILBC_LIBS= + else + AC_DEFINE(HAVE_ILBC,1,[Defined when we have ilbc codec lib]) + AC_SUBST(ILBC_CFLAGS) + AC_SUBST(ILBC_LIBS) + fi +fi + +]) diff -r 9d562dde0a3a -r 80faf1ca5280 m4/osip.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/osip.m4 Wed Nov 09 07:58:36 2005 +0000 @@ -0,0 +1,32 @@ +AC_DEFUN([LP_CHECK_OSIP2],[ + +AC_ARG_WITH( osip, + [ --with-osip Set prefix where osip can be found (ex:/usr or /usr/local)[default=/usr/local] ], + [ osip_prefix=${withval}],[ osip_prefix=/usr ]) +AC_SUBST(osip_prefix) + + +OSIP_CFLAGS="-I$osip_prefix/include" +OSIP_LIBS="-L$osip_prefix/lib" + +dnl check osip2 headers +CPPFLAGS_save=$CPPFLAGS +CPPFLAGS=$OSIP_CFLAGS +AC_CHECK_HEADER([osip2/osip.h], ,AC_MSG_ERROR([Could not find osip2 headers !])) +CPPFLAGS=$CPPFLAGS_save + +dnl check for osip2 libs +LDFLAGS_save=$LDFLAGS +LDFLAGS=$OSIP_LIBS +dnl AC_CHECK_LIB adds osipparser2 to LIBS, I don't want that ! +LIBS_save=$LIBS +AC_CHECK_LIB(osipparser2,osip_message_init, , AC_MSG_ERROR([Could not find osip2 libraries !])) +LDFLAGS=$LDFLAGS_save +LIBS=$LIBS_save + +OSIP_LIBS="$OSIP_LIBS -losipparser2 -losip2" + +AC_SUBST(OSIP_CFLAGS) +AC_SUBST(OSIP_LIBS) + +]) diff -r 9d562dde0a3a -r 80faf1ca5280 m4/speex.m4 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m4/speex.m4 Wed Nov 09 07:58:36 2005 +0000 @@ -0,0 +1,24 @@ +AC_DEFUN([LP_CHECK_SPEEX],[ +dnl only accept speex>=1.1.6 or 1.0.5 (the versions that have speex_encode_int ) +AC_ARG_WITH( speex, + [ --with-speex Set prefix where speex lib can be found (ex:/usr, /usr/local) [default=/usr] ], + [ speex_prefix=${withval}],[ speex_prefix="/usr" ]) + +SPEEX_CFLAGS=" -I${speex_prefix}/include -I${speex_prefix}/include/speex" +SPEEX_LIBS="-L${speex_prefix}/lib -lspeex -lm" +CPPFLAGS_save=$CPPFLAGS +CPPFLAGS=$SPEEX_CFLAGS +LDFLAGS_save=$LDFLAGS +LDFLAGS=$SPEEX_LIBS +AC_CHECK_HEADERS(speex.h,[AC_CHECK_LIB(speex,speex_encode_int,speex_found=yes,speex_found=no) +],speex_found=no) + +if test "$speex_found" = "no" ; then +AC_MSG_ERROR([Could not find a libspeex version that have the speex_encode_int() function. Please install libspeex=1.0.5 or libspeex>=1.1.6]) +fi + +AC_SUBST(SPEEX_CFLAGS) +AC_SUBST(SPEEX_LIBS) +CPPFLAGS=$CPPFLAGS_save +LDFLAGS=$LDFLAGS_save +])