dnl Process this file with autoconf to produce a configure script . AC_INIT ([ gaim ], [ 2.0.0 cvs ], [ gaim - devel @ lists . sourceforge . net ]) AM_CONFIG_HEADER ( config . h ) AM_INIT_AUTOMAKE ( AC_PACKAGE_NAME , AC_PACKAGE_VERSION ) AC_PATH_PROG ( sedpath , sed ) dnl Storing configure arguments AC_DEFINE_UNQUOTED ( CONFIG_ARGS , "$ac_configure_args" , [ configure arguments ]) LIBTOOL = "$LIBTOOL --silent" AC_SUBST ( GETTEXT_PACKAGE ) # before gettexting, in case iconv matters AC_CHECK_LIB ( resolv , res_query ) AC_CHECK_HEADER ( CoreFoundation / CoreFoundation . h , [ AC_CHECK_HEADER ( IOKit / IOKitLib . h , [ AC_DEFINE ( HAVE_IOKIT , 1 , [ Define if we have IOKit ]) LIBS = "$LIBS -framework IOKit -framework CoreFoundation" AC_MSG_CHECKING ([ for fink ]) AC_MSG_RESULT ([ found , adding / sw to search paths ]) CPPFLAGS = "$CPPFLAGS -I/sw/include" LDFLAGS = "$LDFLAGS -L/sw/lib" AC_MSG_RESULT ([ not found ]) ALL_LINGUAS = "am az bg bn bs ca ca_ES@valencian cs da de el en_AU en_CA en_GB es et fa fi fr gl gu he hi hu it ja ka ko ku lt mk my_MM nb nl nn pa pl pt_BR pt ro ru sk sl sq sr sr@Latn sv ta te tr uk vi xh zh_CN zh_TW" dnl we don ' t use autobreak on cygwin !! dnl Checks for header files . AC_CHECK_HEADERS ( arpa / nameser_compat . h fcntl . h sys / time . h unistd . h locale . h signal . h stdint . h regex . h ) dnl Checks for typedefs , structures , and compiler characteristics . dnl Checks for library functions . AC_CHECK_FUNCS ( strdup strstr atexit setlocale ) dnl Checks for getopt in standard library AC_CHECK_FUNCS ( getopt_long ,, AC_CHECK_FUNC ( inet_aton , , [ AC_CHECK_LIB ( resolv , inet_aton , , [ AC_ERROR ( inet_aton not found )])]) AC_CHECK_LIB ( resolv , __res_query ) AC_CHECK_LIB ( nsl , gethostent ) [ AC_CHECK_LIB ( socket , socket , , [ AC_ERROR ([ socket not found ])])]) dnl If all goes well , by this point the previous two checks will have dnl pulled in - lsocket and - lnsl if we need them . AC_CHECK_FUNC ( getaddrinfo , [ AC_DEFINE ([ HAVE_GETADDRINFO ], [ 1 ], [ Define to 1 if you have the getaddrinfo function .])], [ AC_CHECK_LIB ( socket , getaddrinfo , [ AC_DEFINE ([ HAVE_GETADDRINFO ]) LIBS = "-lsocket -lsnl $LIBS" ], , , - lnsl )]) dnl Check for socklen_t ( in Unix98 ) AC_MSG_CHECKING ( for socklen_t ) int accept ( int , struct sockaddr * , size_t * ) ; AC_DEFINE ( socklen_t , size_t , [ socklen_t size ]) AC_DEFINE ( socklen_t , int , [ socklen_t size ]) dnl to prevent the g_stat () / g_unlink () crash , dnl ( 09 : 50 : 07 ) Robot101 : LSchiere2 : it ' s easy . + LC_SYS_LARGEFILE somewhere in configure . ac dnl FreeBSD doesn ' t have libdl , dlopen is provided by libc AC_CHECK_FUNC ( dlopen , LIBDL = "" , [ AC_CHECK_LIB ( dl , dlopen , LIBDL = "-ldl" )]) AC_MSG_CHECKING ( for the % z format string in strftime ()) if ( strftime ( buf , sizeof ( buf ), "%z" , localtime ( & t )) != 5 ) fprintf ( stderr , "strftime( \" %%z \" ) yields: \" %s \"\n " , buf ); return ! (( buf [ 0 ] == '-' || buf [ 0 ] == '+' ) && ( buf [ 1 ] >= '0' && buf [ 1 ] <= '9' ) && ( buf [ 2 ] >= '0' && buf [ 2 ] <= '9' ) && ( buf [ 3 ] >= '0' && buf [ 3 ] <= '9' ) && ( buf [ 4 ] >= '0' && buf [ 4 ] <= '9' ) AC_DEFINE ([ HAVE_STRFTIME_Z_FORMAT ], [ 1 ], [ Define to 1 if you have a strftime () that supports the % z format string .]) # Fallback for Cross Compiling... # This will enable the compatibility code. dnl ####################################################################### dnl # Check for Meanwhile headers ( for Sametime ) dnl ####################################################################### PKG_CHECK_MODULES ( MEANWHILE , [ meanwhile >= 1.0.0 meanwhile < 2.0.0 ], [ AC_SUBST ( MEANWHILE_CFLAGS ) dnl ####################################################################### dnl # Check for Howl headers ( for Bonjour ) dnl ####################################################################### AC_ARG_WITH ( howl - includes , [ AC_HELP_STRING ([ -- with - howl - includes = DIR ], [ Compile the Bonjour plugin against the Howl includes in DIR ])], [ ac_howl_includes = "$withval" ], [ ac_howl_includes = "no" ]) AC_ARG_WITH ( howl - libs , [ AC_HELP_STRING ([ -- with - howl - libs = DIR ], [ Compile the Bonjour plugin against the Howl libs in DIR ])], [ ac_howl_libs = "$withval" ], [ ac_howl_libs = "no" ]) dnl Attempt to autodetect Howl PKG_CHECK_MODULES ( HOWL , howl , [ dnl Override HOWL_CFLAGS if the user specified an include dir if test "$ac_howl_includes" != "no" ; then HOWL_CFLAGS = "-I$ac_howl_includes" CPPFLAGS_save = "$CPPFLAGS" CPPFLAGS = "$CPPFLAGS $HOWL_CFLAGS" AC_CHECK_HEADER ( howl . h , [ howlincludes = yes ], [ howlincludes = no ]) CPPFLAGS = "$CPPFLAGS_save" dnl Override HOWL_LIBS if the user specified a libs dir if test "$ac_howl_libs" != "no" ; then HOWL_LIBS = "-L$ac_howl_libs" AC_CHECK_LIB ( howl , sw_discovery_init , [ howllibs = yes ], [ howllibs = no ], $HOWL_LIBS ) dnl ####################################################################### dnl # Check for SILC client includes and libraries dnl ####################################################################### AC_ARG_WITH ( silc - includes , [ AC_HELP_STRING ([ -- with - silc - includes = DIR ], [ Compile the SILC plugin against includes in DIR ])], [ ac_silc_includes = "$withval" ], [ ac_silc_includes = "no" ]) AC_ARG_WITH ( silc - libs , [ AC_HELP_STRING ([ -- with - silc - libs = DIR ], [ Compile the SILC plugin against the SILC libs in DIR ])], [ ac_silc_libs = "$withval" ], [ ac_silc_libs = "no" ]) if test - n "$with_silc_includes" || test - n "$with_silc_libs" ; then if test "x$silc_manual_check" = "xno" ; then PKG_CHECK_MODULES ( SILC , silcclient , [ dnl If silcclient . pc wasn ' t found , check for just silc . pc if test "x$have_silc" = "xno" ; then PKG_CHECK_MODULES ( SILC , silc , [ if test "$ac_silc_includes" != "no" ; then SILC_CFLAGS = "-I$ac_silc_includes" CPPFLAGS_save = "$CPPFLAGS" CPPFLAGS = "$CPPFLAGS $SILC_CFLAGS" AC_CHECK_HEADER ( silcincludes . h , [ silcincludes = yes ]) CPPFLAGS = "$CPPFLAGS_save" if test "$ac_silc_libs" != "no" ; then SILC_LIBS = "-L$ac_silc_libs" SILC_LIBS = "$SILC_LIBS -lsilc -lsilcclient -lpthread $LIBDL" AC_CHECK_LIB ( silcclient , silc_client_init , [ silcclient = yes ], , $SILC_LIBS ) dnl SILC Toolkit >= 1.0.1 has a new MIME API if test "x$silcclient" = "xyes" ; then CPPFLAGS_save = "$CPPFLAGS" CPPFLAGS = "$CPPFLAGS $SILC_CFLAGS" AC_MSG_CHECKING ( for silcmime . h ) #include <silcincludes.h> AC_DEFINE ( HAVE_SILCMIME_H , 1 , [ Define if we have silcmime . h ]) CPPFLAGS = "$CPPFLAGS_save" dnl ####################################################################### dnl # Check for gadugadu client includes and libraries dnl ####################################################################### AC_ARG_WITH ( gadu - includes , [ AC_HELP_STRING ([ -- with - gadu - includes = DIR ], [ Compile the gadugadu plugin against includes in DIR ])], [ ac_gadu_includes = "$withval" ], [ ac_gadu_includes = "no" ]) AC_ARG_WITH ( gadu - libs , [ AC_HELP_STRING ([ -- with - gadu - libs = DIR ], [ Compile the gadugadu plugin against the libs in DIR ])], [ ac_gadu_libs = "$withval" ], [ ac_gadu_libs = "no" ]) if test - n "$with_gadu_includes" || test - n "$with_gadu_libs" ; then if test "x$gadu_manual_check" = "xno" ; then PKG_CHECK_MODULES ( GADU , libgadu , [ if test "$ac_gadu_includes" != "no" ; then GADU_CFLAGS = "-I$ac_gadu_includes" CPPFLAGS_save = "$CPPFLAGS" CPPFLAGS = "$CPPFLAGS $GADU_CFLAGS" AC_CHECK_HEADER ( libgadu . h , [ gadu_includes = yes ]) CPPFLAGS = "$CPPFLAGS_save" if test "$ac_gadu_libs" != "no" ; then GADU_LIBS = "-L$ac_gadu_libs" GADU_LIBS = "$GADU_LIBS -lgadu" AC_CHECK_LIB ( gadu , gg_libgadu_version , [ gadu_libs = yes ], , $GADU_LIBS ) if test "x$gadu_libs" = "xyes" ; then AC_MSG_CHECKING ( for libgadu GPL compatibility ) CPPFLAGS_save = "$CPPFLAGS" CPPFLAGS = "$CPPFLAGS $GADU_CFLAGS" AC_TRY_COMPILE ([ # include < libgadu . h > ], [ #ifdef __GG_LIBGADU_HAVE_OPENSSL #error "libgadu is not compatible with the GPL when compiled with OpenSSL support." AC_DEFINE ([ HAVE_LIBGADU ], [ 1 ], [ Define to 1 if you have libgadu .]) echo "libgadu is not compatible with the GPL when compiled with OpenSSL support." echo "Please recompile libgadu using:" echo "./autogen.sh --disable-libgadu-openssl --disable-static --enable-shared" echo "Then rerun this ./configure" CPPFLAGS = "$CPPFLAGS_save" AC_ARG_ENABLE ( distrib ,,, enable_distrib = no ) AM_CONDITIONAL ( DISTRIB , test "x$enable_distrib" = "xyes" ) AC_ARG_ENABLE ( prpls , [ -- disable - prpls don ' t build dynamic protocol plugins ],, enable_prpls = yes ) AC_ARG_WITH ( static - prpls , [ -- with - static - prpls link in certain protocols statically ],[ STATIC_PRPLS = ` echo $withval | $sedpath ' s / , / / g '` ], STATIC_PRPLS = "" ) if test "x$STATIC_PRPLS" != "x" - a "x$DYNAMIC_PRPLS" = "xall" ; then if test "x$STATIC_PRPLS" = "xall" ; then STATIC_PRPLS = "bonjour gg irc jabber msn novell oscar sametime silc simple yahoo zephyr" if test "x$have_meanwhile" != "xyes" ; then STATIC_PRPLS = ` echo $STATIC_PRPLS | $sedpath ' s / sametime //'` if test "x$howlincludes" != "xyes" - o "x$howllibs" != "xyes" ; then STATIC_PRPLS = ` echo $STATIC_PRPLS | $sedpath ' s / bonjour //'` if test "x$silcincludes" != "xyes" - o "x$silcclient" != "xyes" ; then STATIC_PRPLS = ` echo $STATIC_PRPLS | $sedpath ' s / silc //'` if test "x$gadu_libs" != "xyes" ; then STATIC_PRPLS = ` echo $STATIC_PRPLS | $sedpath ' s / gg //'` for i in $STATIC_PRPLS ; do dnl Ugly special case for "libsilcgaim.a" : if test "x$i" = "xsilc" ; then STATIC_LINK_LIBS = "$STATIC_LINK_LIBS protocols/$i/lib${i}gaim.a" STATIC_LINK_LIBS = "$STATIC_LINK_LIBS protocols/$i/lib$i.a" extern_init = "$extern_init extern gboolean gaim_init_${i}_plugin();" load_proto = "$load_proto gaim_init_${i}_plugin();" bonjour ) static_bonjour = yes ;; jabber ) static_jabber = yes ;; novell ) static_novell = yes ;; oscar ) static_oscar = yes ;; sametime ) static_sametime = yes ;; simple ) static_simple = yes ;; yahoo ) static_yahoo = yes ;; zephyr ) static_zephyr = yes ;; * ) echo "Invalid static protocol $i!!" ; exit ;; AM_CONDITIONAL ( STATIC_BONJOUR , test "x$static_bonjour" = "xyes" - a "x$howlincludes" = "xyes" - a "x$howllibs" = "xyes" ) AM_CONDITIONAL ( STATIC_GG , test "x$static_gg" = "xyes" ) AM_CONDITIONAL ( STATIC_IRC , test "x$static_irc" = "xyes" ) AM_CONDITIONAL ( STATIC_JABBER , test "x$static_jabber" = "xyes" ) AM_CONDITIONAL ( STATIC_MSN , test "x$static_msn" = "xyes" ) AM_CONDITIONAL ( STATIC_NOVELL , test "x$static_novell" = "xyes" ) AM_CONDITIONAL ( STATIC_OSCAR , test "x$static_oscar" = "xyes" ) AM_CONDITIONAL ( STATIC_SAMETIME , test "x$static_sametime" = "xyes" - a "x$have_meanwhile" = "xyes" ) AM_CONDITIONAL ( STATIC_SILC , test "x$static_silc" = "xyes" - a "x$silcincludes" = "xyes" - a "x$silcclient" = "xyes" ) AM_CONDITIONAL ( STATIC_SIMPLE , test "x$static_simple" = "xyes" ) AM_CONDITIONAL ( STATIC_TOC , test "x$static_toc" = "xyes" ) AM_CONDITIONAL ( STATIC_YAHOO , test "x$static_yahoo" = "xyes" ) AM_CONDITIONAL ( STATIC_ZEPHYR , test "x$static_zephyr" = "xyes" ) AC_SUBST ( STATIC_LINK_LIBS ) AC_DEFINE_UNQUOTED ( STATIC_PROTO_INIT , $extern_init static void static_proto_init () { $load_proto } , [ Loads static protocol plugin module initialization functions .]) AC_ARG_WITH ( dynamic_prpls , [ AC_HELP_STRING ([ -- with - dynamic - prpls ], [ specify which protocols to build dynamically ])], [ DYNAMIC_PRPLS = ` echo $withval | $sedpath ' s / , / / g '` ]) if test "x$DYNAMIC_PRPLS" = "xall" ; then DYNAMIC_PRPLS = "bonjour gg irc jabber msn novell oscar sametime silc simple yahoo zephyr" if test "x$have_meanwhile" != "xyes" ; then DYNAMIC_PRPLS = ` echo $DYNAMIC_PRPLS | $sedpath ' s / sametime //'` if test "x$howlincludes" != "xyes" - o "x$howllibs" != "xyes" ; then DYNAMIC_PRPLS = ` echo $DYNAMIC_PRPLS | $sedpath ' s / bonjour //'` if test "x$silcincludes" != "xyes" - o "x$silcclient" != "xyes" ; then DYNAMIC_PRPLS = ` echo $DYNAMIC_PRPLS | $sedpath ' s / silc //'` if test "x$gadu_libs" != "xyes" ; then DYNAMIC_PRPLS = ` echo $DYNAMIC_PRPLS | $sedpath ' s / gg //'` for i in $DYNAMIC_PRPLS ; do bonjour ) dynamic_bonjour = yes ;; jabber ) dynamic_jabber = yes ;; novell ) dynamic_novell = yes ;; oscar ) dynamic_oscar = yes ;; sametime ) dynamic_sametime = yes ;; silc ) dynamic_silc = yes ;; simple ) dynamic_simple = yes ;; yahoo ) dynamic_yahoo = yes ;; zephyr ) dynamic_zephyr = yes ;; * ) echo "Invalid dynamic protocol $i!!" ; exit ;; AM_CONDITIONAL ( DYNAMIC_BONJOUR , test "x$dynamic_bonjour" = "xyes" - a "x$bonjourincludes" = "xyes" - a "x$bonjourclient" = "xyes" ) AM_CONDITIONAL ( DYNAMIC_GG , test "x$dynamic_gg" = "xyes" ) AM_CONDITIONAL ( DYNAMIC_IRC , test "x$dynamic_irc" = "xyes" ) AM_CONDITIONAL ( DYNAMIC_JABBER , test "x$dynamic_jabber" = "xyes" ) AM_CONDITIONAL ( DYNAMIC_MSN , test "x$dynamic_msn" = "xyes" ) AM_CONDITIONAL ( DYNAMIC_NOVELL , test "x$dynamic_novell" = "xyes" ) AM_CONDITIONAL ( DYNAMIC_OSCAR , test "x$dynamic_oscar" = "xyes" ) AM_CONDITIONAL ( DYNAMIC_SAMETIME , test "x$dynamic_sametime" = "xyes" - a "x$have_meanwhile" = "xyes" ) AM_CONDITIONAL ( DYNAMIC_SILC , test "x$dynamic_silc" = "xyes" - a "x$silcincludes" = "xyes" - a "x$silcclient" = "xyes" ) AM_CONDITIONAL ( DYNAMIC_SIMPLE , test "x$dynamic_simple" = "xyes" ) AM_CONDITIONAL ( DYNAMIC_TOC , test "x$dynamic_toc" = "xyes" ) AM_CONDITIONAL ( DYNAMIC_YAHOO , test "x$dynamic_yahoo" = "xyes" ) AM_CONDITIONAL ( DYNAMIC_ZEPHYR , test "x$dynamic_zephyr" = "xyes" ) AC_ARG_ENABLE ( audio , [ -- disable - audio compile without libao / libaudiofile for sound playing ],, enable_audio = yes ) AC_ARG_ENABLE ( mono , [ -- enable - mono compile with Mono runtime support ],, enable_mono = no ) AC_ARG_ENABLE ( plugins , [ -- disable - plugins compile without plugin support ],, enable_plugins = yes ) AC_ARG_ENABLE ( perl , [ -- disable - perl compile without perl scripting ],, enable_perl = yes ) AC_ARG_ENABLE ( tcl , [ -- disable - tcl compile without Tcl scripting ],, enable_tcl = yes ) AC_ARG_WITH ( tclconfig , [ -- with - tclconfig = DIR directory containing tclConfig . sh ]) AC_ARG_ENABLE ( tk , [ -- disable - tk compile without Tcl support for Tk ],, enable_tk = yes ) AC_ARG_WITH ( tkconfig , [ -- with - tkconfig = DIR directory containing tkConfig . sh ]) AC_ARG_ENABLE ( gtkspell , [ -- disable - gtkspell compile without GtkSpell automatic spell checking ],, enable_gtkspell = yes ) AC_ARG_ENABLE ( debug , [ -- enable - debug compile with debugging support ],, enable_debug = no ) AC_ARG_ENABLE ( fatal - asserts , [ -- enable - fatal - asserts make assertions fatal ( useful for debugging )],, enable_fatal_asserts = no ) dnl We know Gaim won ' t compile with deprecated APIs disabled . dnl We have no desire to support two different versions of the dnl same code when it ' s not necessary , so we ' re sticking with dnl the deprecated APIs in many cases . dnl This option is being left in case things change . dnl AC_ARG_ENABLE ( deprecated , [ -- disable - deprecated compile without deprecated API usage ],, enable_deprecated = yes ) AC_ARG_ENABLE ( fortify , [ -- disable - fortify compile without FORTIFY_SOURCE support ],, enable_fortify = yes ) AC_ARG_ENABLE ( screensaver , [ -- disable - screensaver compile without X screensaver extension ],, enable_xss = yes ) AC_ARG_ENABLE ( sm , [ -- disable - sm compile without X session management support ],, enable_sm = yes ) AC_ARG_WITH ( krb4 , [ -- with - krb4 = PREFIX compile Zephyr plugin with Kerberos 4 support ], kerberos = "$withval" , kerberos = "no" ) AC_ARG_WITH ( zephyr , [ -- with - zephyr = PREFIX compile Zephyr plugin against external libzephyr ], zephyr = "$withval" , zephyr = "no" ) AM_CONDITIONAL ( EXTERNAL_LIBZEPHYR , test "x$zephyr" != "xno" ) AC_CHECK_HEADER ( sys / utsname . h ) if test "x$enable_debug" = "xyes" ; then AC_DEFINE ( DEBUG , 1 , [ Define if debugging is enabled .]) if test "x$enable_fatal_asserts" = "xyes" ; then AC_DEFINE ( GAIM_FATAL_ASSERTS , 1 , [ Define to make assertions fatal ( useful for debugging ).]) if test "x$enable_deprecated" = "xno" ; then DEBUG_CFLAGS = "$DEBUG_CFLAGS -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" if test "x$GCC" = "xyes" ; then dnl We enable - Wall later . dnl If it ' s set after the warning CFLAGS in the compiler invocation , it counteracts the - Wno ... flags . dnl This leads to warnings we don ' t want . CFLAGS = ` echo $CFLAGS | $sedpath ' s /- Wall //'` dnl ENABLE WARNINGS SUPPORTED BY THE VERSION OF GCC IN USE dnl Consider adding - Wbad - function - cast . dnl This leads to spurious warnings using GPOINTER_TO_INT (), et al . directly on a function call . dnl We ' d need an intermediate variable . dnl Consider adding - Wfloat - equal . dnl This leads to warnings with Perl . dnl Perhaps we could write ugly configure magic and pass - Wno - float - equal down to that subdirectory . dnl On the other hand , it ' s probably actually broken , so maybe the Perl folks should fix that ? dnl Consider removing - Wno - sign - compare ( from the - Wextra set ) and fixing all those cases . dnl This is likely non - trivial . "-Wdeclaration-after-statement" \
"-Werror-implicit-function-declaration" \
"-Wextra -Wno-sign-compare -Wno-unused-parameter" \
"-Wmissing-declarations" \
CFLAGS = "$CFLAGS $newflag" AC_MSG_CHECKING ( for $newflag option to gcc ) DEBUG_CFLAGS = "$DEBUG_CFLAGS $newflag" if test "x$enable_fortify" = "xyes" ; then AC_MSG_CHECKING ( for FORTIFY_SOURCE support ) AC_TRY_COMPILE ([ # include < features . h > ], [ #if !(__GNUC_PREREQ (4, 1) \ || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \ || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \ && (__GNUC_PATCHLEVEL__ > 2 \ || (__GNUC_PATCHLEVEL__ == 2 && __GNUC_RH_RELEASE__ >= 8)))) #error No FORTIFY_SOURCE support DEBUG_CFLAGS = "$DEBUG_CFLAGS -D_FORTIFY_SOURCE=2" DEBUG_CFLAGS = "-Wall $DEBUG_CFLAGS" AM_PATH_GLIB_2_0 ( 2.0.0 ,, AC_MSG_ERROR ([ *** GLib 2.0 is required to build Gaim ; please make sure you have the GLib *** development headers installed . The latest version of GLib is *** always available at http : //www.gtk.org/.])) AM_PATH_GTK_2_0 ( 2.0.0 ,, AC_MSG_ERROR ([ *** GTK + 2.0 is required to build Gaim ; please make sure you have the GTK + *** development headers installed . The latest version of GTK + is *** always available at http : //www.gtk.org/.])) AC_PATH_PROG ( gaimpath , gaim ) # We can't assume that $x_libraries will be set, because autoconf does not # set it in the case when the X libraries are in a standard place. if test X "$x_libraries" = X "" || test X "$x_libraries" = XNONE ; then x_libpath_add = "-L$x_libraries" if test X "$x_includes" = X "" || test X "$x_includes" = XNONE ; then x_incpath_add = "-I$x_includes" dnl ####################################################################### dnl # Check for DBUS libraries dnl ####################################################################### AC_ARG_ENABLE ( dbus , [ -- enable - dbus enable DBUS support ],, enable_dbus = yes ) if test "x$enable_dbus" = "xyes" ; then AC_CHECK_PROG ( enable_dbus , dbus - binding - tool , yes , no ) if test "x$enable_dbus" = "xyes" ; then PKG_CHECK_MODULES ( DBUS , [ dbus -1 >= 0.35 dbus - glib -1 >= 0.35 ], dnl Why do we need python ? dnl Python scripts are used to auto - generate about 3000 lines of C dnl and XML code that wraps ( part of ) the existing Gaim API so that dnl it is now accessible through DBUS . dnl Python is only required if -- enable - dbus is used , and only for dnl the build process to generate the code , not for running gaim . dnl This autogenerated code is system - independent , so in principle we dnl can generate all of it before shipping . But I thought adding dnl auto - generated stuff to the CVS is inelegant . Alternatively , dnl these python scripts could be rewritten in C ( brrrr ...). AC_HELP_STRING ([ -- with - python ], [ Which python interpreter to use for dbus code generation ]), if test "x$enable_dbus" = "xyes" ; then if test - z "$PYTHON" ; then AC_PATH_PROG ([ PYTHON ], [ python ], [ no ]) if test x "$python" = x "no" ; then AC_MSG_WARN ([ python interpreter not found in your path ]) if test "x$enable_dbus" = "xyes" ; then if $PYTHON - c "import sys; sys.exit(sys.version[[:3]] >= '2.4')" ; then AC_MSG_WARN ([ python version >= 2.4 required ]) dnl ########################################################################### dnl # Find the D - Bus services dir . dnl # This is a 3 step process that dnl # 1. checks if -- with - dbus - services was set , if so use that . dnl # 2. checks if -- prefix was given , if so use that . dnl # 3. fallbacks to installing into what should be the correct system dnl # This is still prone to error if one of the legacy directories exist dnl # although a newer dbus is installed . But I have tried to order the dnl # directory searching to keep this situation at a minimum . dnl ########################################################################### AC_ARG_WITH ( dbus - services , [ -- with - dbus - services =< dir > Where the D - Bus services directory is located .]) if test x "$enable_dbus" = "xyes" ; then AC_MSG_CHECKING ([ location of the D - Bus services directory ]) if ! test - z "$with_dbus_services" ; then if ! test - d "$with_dbus_services" ; then AC_MSG_ERROR ([ $with_dbus_services does not exist , if this is the correct location please make sure that it exists .]) DBUS_SERVICES_DIR = "$with_dbus_services" if test x "$prefix" = x "NONE" ; then dnl # no prefix given , so we look for the correct dbus system paths . dnl # if a prefix is given , we use it . serviceprefixes = "$datadir $libdir /usr/share /usr/local/share" for d in $serviceprefixes ; do if test - z $DBUS_SERVICES_DIR ; then AC_MSG_ERROR ([ D - Bus services directory was not found ! Please use -- with - dbus - services and specify it ' s location .]) DBUS_SERVICES_DIR = "$datadir/dbus-1/services" AC_MSG_RESULT ([ $DBUS_SERVICES_DIR ]) AC_DEFINE ( HAVE_DBUS , 1 , [ Define if we are re using DBUS .]) AC_SUBST ( DBUS_SERVICES_DIR ) if test "x$enable_dbus" = "xyes" ; then echo "Building with DBUS support" echo "Building without DBUS support" AM_CONDITIONAL ( ENABLE_DBUS , test "x$enable_dbus" = "xyes" ) dnl ####################################################################### dnl # Check for startup notification dnl ####################################################################### AC_ARG_ENABLE ( startup - notification , [ -- disable - startup - notification compile without startup notification support ],, enable_startup_notification = yes ) if test "x$enable_startup_notification" = "xyes" ; then PKG_CHECK_MODULES ( STARTUP_NOTIFICATION , libstartup - notification -1.0 >= 0.5 , AC_DEFINE ( HAVE_STARTUP_NOTIFICATION , 1 , [ Define if we ' re using libstartup - notification .]) enable_startup_notification = yes enable_startup_notification = no AC_SUBST ( STARTUP_NOTIFICATION_CFLAGS ) AC_SUBST ( STARTUP_NOTIFICATION_LIBS ) dnl ####################################################################### dnl # Check for stuff needed by the evolution integration plugin . dnl ####################################################################### AC_ARG_ENABLE ( gevolution , [ -- disable - gevolution compile without the Gaim - Evolution plugin ],, enable_gevolution = yes ) if test "x$enable_gevolution" = "xyes" ; then evo_deps = "libebook-1.2 libedata-book-1.2" PKG_CHECK_MODULES ( EVOLUTION_ADDRESSBOOK , $evo_deps , [ AC_DEFINE ( HAVE_EVOLUTION_ADDRESSBOOK , 1 , [ Define if we ' re using evolution addressbook .]) if test "x$build_gevo" = "xno" ; then evo_deps = "libebook-1.0 libedata-book-1.0" PKG_CHECK_MODULES ( EVOLUTION_ADDRESSBOOK , $evo_deps , [ AC_DEFINE ( HAVE_EVOLUTION_ADDRESSBOOK , 1 , [ Define if we ' re using evolution addressbook .]) AC_SUBST ( EVOLUTION_ADDRESSBOOK_CFLAGS ) AC_SUBST ( EVOLUTION_ADDRESSBOOK_LIBS ) AM_CONDITIONAL ( BUILD_GEVOLUTION , test "x$build_gevo" = "xyes" ) dnl ####################################################################### dnl # Check for XScreenSaver dnl ####################################################################### if test "x$enable_xss" = "xyes" ; then LIBS = "$LIBS $GTK_LIBS $x_libpath_add" AC_CHECK_LIB ( Xext , XScreenSaverRegister ,[ XSS_LIBS = "$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS" ],[],[ - lX11 - lXext - lm ]) AC_CHECK_LIB ( Xss , XScreenSaverRegister ,[ XSS_LIBS = "$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss" ],[],[ - lX11 - lXext - lm ]) if test \ ! "$XSS_LIBS" = "no" ; then CPPFLAGS = "$CPPFLAGS $x_incpath_add" #include <X11/extensions/scrnsaver.h> AC_DEFINE ( USE_SCREENSAVER , 1 , [ Define if we ' re using XScreenSaver .])],[ enable_xss = no ] dnl ####################################################################### dnl # Check for X session management libs dnl ####################################################################### if test "x$enable_sm" = "xyes" ; then AC_CHECK_LIB ( SM , SmcSaveYourselfDone , found_sm_lib = true , , [ $x_libpath_add - lICE ]) if test "$found_sm_lib" = "true" ; then CPPFLAGS = "$CPPFLAGS $x_incpath_add" AC_CHECK_HEADERS ( X11 / SM / SMlib . h , SM_LIBS = "$x_libpath_add -lSM -lICE" enable_sm = yes ) if test "$enable_sm" = "yes" ; then AC_DEFINE ( USE_SM , 1 , [ Define if we ' re using X Session Management .]) [ AC_REQUIRE ([ AC_STRUCT_TM ]) dnl AC_CACHE_CHECK ([ for tm_gmtoff in struct tm ], ac_cv_struct_tm_gmtoff , [ AC_TRY_COMPILE ([ # include < sys / types . h > #include <$ac_cv_struct_tm> ], [struct tm tm; tm.tm_gmtoff;], ac_cv_struct_tm_gmtoff = yes , ac_cv_struct_tm_gmtoff = no )]) if test "$ac_cv_struct_tm_gmtoff" = yes ; then AC_DEFINE ( HAVE_TM_GMTOFF , 1 , [ tm_gmtoff is available .]) dnl ####################################################################### dnl # Check for Mono support dnl ####################################################################### if test x "$enable_mono" = x "yes" ; then AC_MSG_CHECKING ( for Mono compile flags ) MONO_CFLAGS = ` pkg - config -- cflags mono 2 > / dev / null ` AC_MSG_RESULT ([ not found , building without mono .]) MONO_LIBS = ` pkg - config -- libs mono 2 > / dev / null ` AC_MSG_CHECKING ( for libmono ) AC_CHECK_FUNCS ( mono_jit_init , [], enable_mono = no ) CPPFLAGS = "$CPPFLAGS $MONO_CFLAGS" AC_CHECK_HEADERS ( mono / jit / jit . h , [], enable_mono = no ) AC_CHECK_HEADERS ( mono / metadata / object . h , [], enable_mono = no ) AC_DEFINE ( ENABLE_MONO , 1 , [ Define if mono enabled .]) AM_CONDITIONAL ( USE_MONO , test x "$enable_mono" = x "yes" ) dnl ####################################################################### dnl # Check for Perl support dnl ####################################################################### if test "$enable_plugins" = no ; then if test "$enable_perl" = yes ; then AC_PATH_PROG ( perlpath , perl ) AC_MSG_CHECKING ( for Perl compile flags ) PERL_CFLAGS = ` $perlpath - MExtUtils :: Embed - e ccopts 2 >/ dev / null ` if test "_$PERL_CFLAGS" = _ ; then AC_MSG_RESULT ([ not found , building without perl .]) PERL_LIBS = ` $perlpath - MExtUtils :: Embed - e ldopts 2 >/ dev / null | $sedpath ' s /- lgdbm //'` PERL_LIBS = ` echo $PERL_LIBS | $sedpath ' s /- ldb //'` PERL_LIBS = ` echo $PERL_LIBS | $sedpath ' s /- lndbm //'` if test "$system" = "Linux" ; then PERL_LIBS = ` echo $PERL_LIBS | $sedpath ' s /- lnsl //'` PERL_LIBS = ` echo $PERL_LIBS | $sedpath ' s /- lposix //'` PERL_LIBS = ` echo $PERL_LIBS | $sedpath ' s /- lc //'` AC_MSG_CHECKING ( for libperl ) AC_CHECK_FUNCS ( perl_run , [], enable_perl = no ) CPPFLAGS = "$CPPFLAGS $PERL_CFLAGS" AC_CHECK_HEADERS ( EXTERN . h ) AC_CHECK_HEADERS ( perl . h , [], enable_perl = no , if test "$enable_perl" = yes ; then AC_PROG_PERL_MODULES ( ExtUtils :: MakeMaker , , have_makemaker = no ) if test "x$have_makemaker" = "xno" ; then AM_CONDITIONAL ( USE_PERL , false ) AC_MSG_WARN ( Compiling perl requires ExtUtils :: MakeMaker ) AM_CONDITIONAL ( USE_PERL , true ) AC_DEFINE ( HAVE_PERL , [ 1 ], [ Compile with support for perl ]) dnl This is almost definitely wrong , but in case there ' s dnl something I ' m missing , I ' ll leave it in . AC_CHECK_FUNCS ( Perl_eval_pv ) AC_MSG_CHECKING ( for old perl ) PERL_OLD = ` $perlpath - e ' if ( $ ] < 5.006 ) { printf "yes \n " ;} else { printf "no \n " ;}'` if test "x$PERL_OLD" = "xyes" ; then AC_DEFINE ( OLD_PERL , 1 , [ Define if old perl is installed .]) if test "x$prefix" != "xNONE" ; then prefix = ` eval echo $prefix ` PERL_MM_PARAMS = "INSTALLDIRS=vendor PREFIX=$prefix" [ -- with - perl - lib = [ site | vendor | DIR ] Specify where to install the Perl libraries for gaim . Default is site .], if test "x$withval" = xsite ; then elif test "x$withval" = xvendor ; then if test - z "`$perlpath -v | grep '5\.0'`" ; then PERL_MM_PARAMS = "INSTALLDIRS=vendor" PERL_MM_PARAMS = "INSTALLDIRS=vendor PREFIX=`perl -e 'use Config; print $Config{prefix}'`" PERL_MM_PARAMS = "INSTALLDIRS=vendor PREFIX=$withval" AC_MSG_CHECKING ( for DynaLoader . a ) DYNALOADER_A = ` echo $PERL_LDFLAGS | $perlpath - pe ' s /^ (. * ) * ([[ ^ ]] * DynaLoader \ . a ). */ \ 2 / '` dnl Don ' t check libperl . a if dynaloader . a wasn ' t found . if test - n "$DYNALOADER_A" ; then dnl Find either libperl . a or libperl . so AC_MSG_CHECKING ( for libperl . a or libperl . so ) LIBPERL_A = ` echo "$PERL_LDFLAGS -L/usr/lib" | $perlpath - e ' foreach ( split ( / / , < STDIN > )) { if ( /^- L (. * ) / ) { my $dir = $1 ; if ( \` ls $dir / libperl . so * 2 >/ dev / null \` ) { print "-lperl" ; last ; }; if ( - e "$dir/libperl.a" ) { print "$dir/libperl.a" ; last } } };'` if test - z "$LIBPERL_A" ; then if test "$LIBPERL_A" = "-lperl" ; then PERL_LIBS = ` echo $PERL_LIBS | $perlpath - pe ' s /^ (. * ) * [[ ^ ]] * DynaLoader \ . a / \ 1l ibperl_dynaloader . la / '` if test - n "$LIBPERL_A" ; then PERL_LIBS = ` echo $PERL_LDFLAGS | $sedpath - e ' s /- lperl / libperl_orig . la / ' - e ' s /- lperl$ / libperl_orig . la$ / '` AM_CONDITIONAL ( USE_PERL , false ) dnl ####################################################################### dnl # Thanks go to Evolution for the checks . dnl ####################################################################### dnl These two are inverses of each other <-- stolen from evolution ! [ -- enable - gnutls = [ yes , no ] Attempt to use GNUTLS for SSL support ( preferred ) [ default = yes ]], [ enable_gnutls = "$enableval" ], [ -- enable - nss = [ yes , no , static ] Attempt to use Mozilla libnss for SSL support [ default = yes ]], [ enable_nss = "$enableval" ], msg_ssl = "None (MSN will not work without SSL!)" dnl # Check for GNUTLS if it ' s specified . if test "x$enable_gnutls" != "xno" ; then prefix = ` eval echo $prefix ` AC_ARG_WITH ( gnutls - includes , [ -- with - gnutls - includes = PREFIX Location of GNUTLS includes .], [ with_gnutls_includes = "$withval" ], [ with_gnutls_includes = "$prefix/include" ]) have_gnutls_includes = "no" if test "x$with_gnutls_includes" != "xno" ; then CPPFLAGS_save = "$CPPFLAGS" AC_MSG_CHECKING ( for GNUTLS includes ) CPPFLAGS = "$CPPFLAGS -I$with_gnutls_includes" AC_CHECK_HEADERS ( gnutls / gnutls . h , [ gnutls_includes = "yes" ]) CPPFLAGS = "$CPPFLAGS_save" if test "x$gnutls_includes" != "xno" - a \
"x$gnutls_includes" != "x" ; then have_gnutls_includes = "yes" GNUTLS_CFLAGS = "-I$with_gnutls_includes" AC_MSG_CHECKING ( for GNUTLS includes ) [ -- with - gnutls - libs = PREFIX Location of GNUTLS libraries .], [ with_gnutls_libs = "$withval" ]) if test "x$with_gnutls_libs" != "xno" - a \
"x$have_gnutls_includes" != "xno" ; then case $with_gnutls_libs in * ) with_gnutls_libs = "-L$with_gnutls_libs" ;; AC_CACHE_CHECK ([ for GNUTLS libraries ], gnutls_libs , LDFLAGS = "$LDFLAGS $with_gnutls_libs -lgnutls -lgcrypt" AC_TRY_LINK_FUNC ( gnutls_init , gnutls_libs = "yes" , gnutls_libs = "no" ) if test "x$gnutls_libs" != "xno" ; then AC_DEFINE ( HAVE_GNUTLS , 1 , [ Define if you have GNUTLS ]) GNUTLS_LIBS = "$with_gnutls_libs -lgnutls -lgcrypt" AC_MSG_CHECKING ( for GNUTLS libraries ) AM_CONDITIONAL ( USE_GNUTLS , test "x$enable_gnutls" = "xyes" ) dnl # Check for NSS if it ' s specified , or if GNUTLS checks failed . if test "x$enable_nss" != "xno" ; then AC_ARG_WITH ( nspr - includes , [ -- with - nspr - includes = PREFIX Specify location of Mozilla nspr4 includes .], [ with_nspr_includes = "$withval" ]) [ -- with - nspr - libs = PREFIX Specify location of Mozilla nspr4 libs .], [ with_nspr_libs = "$withval" ]) AC_ARG_WITH ( nss - includes , [ -- with - nss - includes = PREFIX Specify location of Mozilla nss3 includes .], [ with_nss_includes = "$withval" ]) [ -- with - nss - libs = PREFIX Specify location of Mozilla nss3 libs .], [ with_nss_libs = "$withval" ]) if test - n "$with_nspr_includes" || test - n "$with_nspr_libs" || \
test - n "$with_nss_includes" || test - n "$with_nss_libs" || test "x$enable_nss" = "xstatic" ; then if test "x$nss_manual_check" = "xno" ; then if ` $PKG_CONFIG -- exists mozilla - nss `; then PKG_CHECK_MODULES ( NSS , mozilla - nss , [ mozilla_nspr = "mozilla-nspr" mozilla_nss = "mozilla-nss" if ` $PKG_CONFIG -- exists nss `; then PKG_CHECK_MODULES ( NSS , nss , [ if test "x$have_nss" = "xyes" ; then AC_DEFINE ( HAVE_NSS , 1 , [ Define if you have Mozilla NSS ]) AC_DEFINE ( HAVE_SSL , 1 , [ Define if you have SSL ]) if test "x$nss_manual_check" = "xyes" ; then if test "x$with_nspr_includes" != "xno" ; then AC_MSG_CHECKING ( for Mozilla nspr4 includes in $with_nspr_includes ) CPPFLAGS = "$CPPFLAGS -I$with_nspr_includes" AC_CHECK_HEADERS ( nspr . h prio . h , [ moz_nspr_includes = "yes" ]) if test "x$moz_nspr_includes" != "xno" - a \
"x$moz_nspr_includes" != "x" ; then NSPR_CFLAGS = "-I$with_nspr_includes" AC_MSG_CHECKING ( for Mozilla nspr4 includes ) if test "x$with_nspr_libs" != "xno" - a \
"x$have_nspr_includes" != "xno" ; then if test "$enable_nss" = "static" ; then if test - z "$with_nspr_libs" ; then [ Static linkage requested , but path to nspr libraries not set .] [ Please specify the path to libnspr4 . a ] [ Example : -- with - nspr - libs =/ usr / lib ]) nsprlibs = "$LIBDL $with_nspr_libs/libplc4.a $with_nspr_libs/libplds4.a $with_nspr_libs/libnspr4.a $PTHREAD_LIB" nsprlibs = "$LIBDL -lplc4 -lplds4 -lnspr4 $PTHREAD_LIB" AC_CACHE_CHECK ([ for Mozilla nspr libraries ], moz_nspr_libs , CFLAGS = "$CFLAGS $NSPR_CFLAGS" if test "x$with_nspr_libs" != "x" ; then LDFLAGS = "$LDFLAGS -L$with_nspr_libs" AC_TRY_LINK_FUNC ( PR_Init , if test "x$moz_nspr_libs" != "xno" ; then NSPR_LIBS = "-L$with_nspr_libs $nsprlibs" AC_MSG_CHECKING ( for Mozilla nspr4 libraries ) if test "x$with_nss_includes" != "xno" - a \
"x$have_nspr_libs" != "xno" ; then AC_MSG_CHECKING ( for Mozilla nss3 includes in $with_nss_includes ) if test "x$with_nspr_includes" != "x" ; then CPPFLAGS = "$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes" CPPFLAGS = "$CPPFLAGS -I$with_nss_includes" AC_CHECK_HEADERS ( nss . h ssl . h smime . h , [ moz_nss_includes = "yes" ], if test "x$moz_nss_includes" = "xyes" ; then NSS_CFLAGS = "-I$with_nss_includes" AC_MSG_CHECKING ( for Mozilla nss3 includes ) if test "x$with_nss_libs" != "xno" - a \
"x$have_nss_includes" != "xno" ; then if test "$enable_nss" = "static" ; then if test - z "$with_nss_libs" ; then [ Static linkage requested , but path to nss libraries not set .] [ Please specify the path to libnss3 . a ] [ Example : -- with - nspr - libs =/ usr / lib / mozilla ]) nsslibs = "-ldb1 $with_nss_libs/libnssckfw.a $with_nss_libs/libasn1.a $with_nss_libs/libcrmf.a $with_nss_libs/libswfci.a $with_nss_libs/libjar.a $with_nss_libs/libpkcs12.a $with_nss_libs/libpkcs7.a $with_nss_libs/libpki1.a $with_nss_libs/libsmime.a $with_nss_libs/libssl.a $with_nss_libs/libnss.a $with_nss_libs/libpk11wrap.a $with_nss_libs/libsoftokn.a $with_nss_libs/libfreebl.a $with_nss_libs/libnsspki.a $with_nss_libs/libnssdev.a $with_nss_libs/libcryptohi.a $with_nss_libs/libcerthi.a $with_nss_libs/libcertdb.a $with_nss_libs/libsecutil.a $with_nss_libs/libnssb.a" nsslibs = "$nsslibs $with_nss_libs/libfreeb1.a" nsslibs = "-lssl3 -lsmime3 -lnss3 -lsoftokn3" AC_CACHE_CHECK ([ for Mozilla nss libraries ], moz_nss_libs , LDFLAGS = "$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs" LIBS = "$nsslibs $nsprlibs" AC_TRY_LINK_FUNC ( NSS_Init , if test "x$moz_nss_libs" = "xno" ; then nsslibs = "-lssl3 -lsmime3 -lnss3 -lsoftokn3" LDFLAGS = "$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs" AC_TRY_LINK_FUNC ( NSS_Init , if test "x$moz_nss_libs" != "xno" ; then NSS_LIBS = "-L$with_nss_libs $nsslibs" if test "$enable_nss" = "static" ; then msg_nss = "Mozilla NSS (static)" AC_MSG_CHECKING ( for Mozilla nss libraries ) NSS_CFLAGS = "$NSPR_CFLAGS $NSS_CFLAGS" NSS_LIBS = "$NSPR_LIBS $NSS_LIBS" AM_CONDITIONAL ( USE_NSS , test "x$enable_nss" = "xyes" ) if test "x$msg_nss" != "x" - a "x$msg_gnutls" != "x" ; then msg_ssl = "$msg_nss and $msg_gnutls" elif test "x$msg_nss" != "x" ; then elif test "x$msg_gnutls" != "x" ; then if test "$enable_plugins" = no ; then if test "$enable_tcl" = yes ; then AC_MSG_CHECKING ([ for tclConfig . sh ]) TCLCONFIGDIRS = "/usr/lib \ /System/Library/Tcl/8.3 \ for dir in $with_tclconfig $TCLCONFIGDIRS ; do if test - f $dir / tclConfig . sh ; then TCLCONFIG = $dir / tclConfig . sh AC_MSG_RESULT ([ yes ( $TCLCONFIG )]) if test "$TCLCONFIG" = "no" ; then AC_MSG_CHECKING ([ Tcl version compatability ]) if test "$TCL_MAJOR_VERSION" - ne 8 - o "$TCL_MINOR_VERSION" - lt 3 ; then AC_MSG_RESULT ([ bad , $TCL_VERSION found but 8.3 or later required ]) AC_MSG_RESULT ([ ok , $TCL_VERSION ]) eval "TCL_LIB_SPEC= \" $TCL_LIB_SPEC \" " AC_MSG_CHECKING ([ for Tcl linkability ]) CPPFLAGS = "$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include" LIBS = "$LIBS $TCL_LIB_SPEC" AC_TRY_LINK ([ # include < tcl . h > ], [ Tcl_Interp * interp = NULL ; Tcl_Init ( interp )], [ AC_MSG_RESULT ([ yes ]) ; enable_tcl = yes ], [ AC_MSG_RESULT ([ no ]) ; enable_tcl = no ]) if test "$enable_tcl" = yes ; then AM_CONDITIONAL ( USE_TCL , true ) AC_DEFINE ( HAVE_TCL , [ 1 ], [ Compile with support for the Tcl toolkit ]) TCL_CFLAGS = "$TCL_INCLUDE_SPEC -I$TCL_PREFIX/include" if test "x$GCC" = "xyes" ; then TCL_CFLAGS = "$TCL_CFLAGS -fno-strict-aliasing" AM_CONDITIONAL ( USE_TCL , false ) if test "$enable_tcl" = yes - a "$enable_tk" = yes ; then AC_MSG_CHECKING ([ for tkConfig . sh ]) for dir in $with_tkconfig $TKCONFIGDIRS ; do if test - f $dir / tkConfig . sh ; then TKCONFIG = $dir / tkConfig . sh AC_MSG_RESULT ([ yes ( $TKCONFIG )]) if test "$TKCONFIG" = "no" ; then eval "TK_LIB_SPEC= \" $TK_LIB_SPEC \" " AC_MSG_CHECKING ([ for Tk linkability ]) CPPFLAGS = "$CPPFLAGS $TCL_CFLAGS" LIBS = "$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC" AC_TRY_LINK ([ # include < tk . h > ], [ Tcl_Interp * interp = NULL ; Tcl_Init ( interp ) ; Tk_Init ( interp ) ; ], [ AC_MSG_RESULT ([ yes ]) ; enable_tk = yes ], [ AC_MSG_RESULT ([ no ]) ; enable_tk = no ]) if test "$enable_tk" = yes ; then AM_CONDITIONAL ( USE_TK , true ) AC_DEFINE ( HAVE_TK , [ 1 ], [ Compile with support for the Tk toolkit ]) AM_CONDITIONAL ( USE_TK , false ) if test "$enable_gtkspell" = yes ; then PKG_CHECK_MODULES ( GTKSPELL , gtkspell -2.0 >= 2.0.2 , [], [ if test "$enable_gtkspell" = "yes" ; then AC_SUBST ( GTKSPELL_CFLAGS ) AC_DEFINE ( USE_GTKSPELL ,,[ do we have gtkspell ? ]) if test "$enable_audio" = yes ; then GAIM_PATH_AO ( found_ao_lib = true ) AM_PATH_AUDIOFILE ([ 0.2.0 ], found_af_lib = true ) if test "$found_ao_lib" = "true" - a "$found_af_lib" = "true" ; then SOUND_LIBS = "$SOUND_LIBS $AO_LIBS $AUDIOFILE_LIBS" AC_DEFINE ( USE_AO , 1 , [ Define if we ' re using libao and libaudiofile for sound playing ]) if test "$ac_cv_cygwin" = yes ; then AC_DEFINE ( DEBUG , 1 , [ Define if debugging is enabled .]) if test "x$enable_plugins" = "xyes" ; then AC_DEFINE ( GAIM_PLUGINS , 1 , [ Define if plugins are enabled .]) AM_CONDITIONAL ( PLUGINS , test "x$enable_plugins" = "xyes" ) AM_CONDITIONAL ( PLUGINS , false ) if test "x$enable_prpls" = "xyes" ; then AM_CONDITIONAL ( PRPLS , test "x$enable_plugins" = "xyes" ) AM_CONDITIONAL ( PRPLS , false ) dnl AC_CHECK_SIZEOF ( short ) AC_CHECK_FUNCS ( snprintf connect ) AC_ARG_ENABLE ( cyrus - sasl , AC_HELP_STRING ([ -- enable - cyrus - sasl ], [ enable Cyrus SASL support for jabberd ]), enable_cyrus_sasl = $enableval , enable_cyrus_sasl = no ) if test "x-$enable_cyrus_sasl" = "x-yes" ; then AC_CHECK_LIB ( sasl2 , sasl_client_init , [ AC_DEFINE ( HAVE_CYRUS_SASL , [ 1 ], [ Define to 1 if Cyrus SASL is present ]) SASL_LIBS =- "lsasl2" ], [ AC_ERROR ( Cyrus SASL library not found )]) AC_DEFINE ( ZEPHYR_INT32 , long , [ Size of an int32 .]) if test "$kerberos" != "no" ; then if test "$kerberos" != "yes" ; then KRB4_CFLAGS = "-I${kerberos}/include" if test - d "$kerberos/include/kerberosIV" ; then KRB4_CFLAGS = "$KRB4_CFLAGS -I${kerberos}/include/kerberosIV" KRB4_LDFLAGS = "-L${kerberos}/lib" elif test - d / usr / local / include / kerberosIV ; then KRB4_CFLAGS = "-I/usr/local/include/kerberosIV" elif test - d / usr / include / kerberosIV ; then KRB4_CFLAGS = "-I/usr/include/kerberosIV" AC_DEFINE ( ZEPHYR_USES_KERBEROS , 1 , [ Define if kerberos should be used in Zephyr .]) LDFLAGS = "$LDFLAGS $KRB4_LDFLAGS" AC_CHECK_LIB ( krb4 , krb_rd_req , [ KRB4_LIBS = "-lkrb4 -ldes425 -lkrb5 -lk5crypto -lcom_err" ], [ AC_CHECK_LIB ( krb , krb_rd_req , [ KRB4_LIBS = "-lkrb -ldes" ], [ AC_ERROR ( Kerberos 4 libraries not found )], - ldes425 - lkrb5 - lk5crypto - lcom_err ) AC_CHECK_FUNCS ( krb_set_key krb_rd_req krb_get_lrealm ) AC_CHECK_FUNCS ( krb_get_err_text krb_log ) dnl checks for an external libzephyr if test "$zephyr" != "no" ; then if test "$zephyr" != "yes" ; then ZEPHYR_CFLAGS = "-I${zephyr}/include" ZEPHYR_LDFLAGS = "-L${zephyr}/lib" elif test - d / usr / athena / include / zephyr ; then ZEPHYR_CFLAGS = "-I/usr/athena/include" elif test - d / usr / include / zephyr ; then ZEPHYR_CFLAGS = "-I/usr/include" elif test - d / usr / local / include / zephyr ; then ZEPHYR_CFLAGS = "-I/usr/local/include" AC_DEFINE ( LIBZEPHYR_EXT , 1 , [ Define if external libzephyr should be used .]) AM_CONDITIONAL ( EXTERNAL_LIBZEPHYR , test "x$zephyr" != "xno" ) LDFLAGS = "$LDFLAGS $ZEPHYR_LDFLAGS" AC_CHECK_LIB ( zephyr , ZInitialize , [ ZEPHYR_LIBS = "-lzephyr" ], [ AC_ERROR ( Zephyr libraries not found )], AC_MSG_CHECKING ( for me pot o ' gold ) AC_CHECK_FUNCS ( gethostid lrand48 ) AC_CHECK_FUNCS ( memcpy memmove random strchr strerror vprintf ) AC_CHECK_HEADERS ( malloc . h paths . h sgtty . h stdarg . h sys / cdefs . h ) AC_CHECK_HEADERS ( sys / file . h sys / filio . h sys / ioctl . h sys / msgbuf . h ) AC_CHECK_HEADERS ( sys / select . h sys / uio . h sys / utsname . h sys / wait . h ) AC_CHECK_HEADERS ( termios . h ) AC_VAR_TIMEZONE_EXTERNALS dnl ####################################################################### dnl ####################################################################### AC_ARG_ENABLE ( doxygen , [ -- enable - doxygen enable documentation with doxygen ],, enable_doxygen = yes ) AC_ARG_ENABLE ( dot , [ -- enable - dot enable graphs in doxygen via ' dot ' ],, enable_dot = yes ) if test "x$enable_doxygen" = xyes ; then AC_CHECK_PROG ( DOXYGEN , doxygen , true , false ) if test $DOXYGEN = false ; then AC_MSG_WARN ([ *** doxygen not found , docs will not be available ]) AC_DEFINE_UNQUOTED ( HAVE_DOXYGEN , 1 , [ whether or not we have doxygen ]) if test "x$enable_dot" = xyes ; then AC_CHECK_PROG ( DOT , dot , true , false ) if test $DOT = false ; then AC_MSG_WARN ([ *** dot not found , graphs will not be available ]) AC_DEFINE_UNQUOTED ( HAVE_DOT , 1 , [ whether or not we have dot ]) AC_MSG_WARN ([ *** dot not found , graphs will not be available ]) if test "x$enable_doxygen" = xyes ; then AM_CONDITIONAL ( HAVE_DOXYGEN , true ) AM_CONDITIONAL ( HAVE_DOXYGEN , false ) cp - p VERSION VERSION . ac - save AC_CONFIG_COMMANDS_POST ([ cmp VERSION VERSION . ac - save || touch - r VERSION . ac - save VERSION pixmaps / smileys / default / Makefile pixmaps / smileys / none / Makefile pixmaps / status / default / Makefile plugins / gevolution / Makefile plugins / gestures / Makefile plugins / mono / api / Makefile plugins / mono / loader / Makefile plugins / musicmessaging / Makefile plugins / perl / common / Makefile . PL src / protocols / bonjour / Makefile src / protocols / gg / Makefile src / protocols / irc / Makefile src / protocols / jabber / Makefile src / protocols / msn / Makefile src / protocols / napster / Makefile src / protocols / novell / Makefile src / protocols / oscar / Makefile src / protocols / sametime / Makefile src / protocols / silc / Makefile src / protocols / simple / Makefile src / protocols / toc / Makefile src / protocols / yahoo / Makefile src / protocols / zephyr / Makefile echo Build Protocol Plugins ........ : $enable_prpls echo Protocols to link statically .. : $STATIC_PRPLS echo Protocols to build dynamically : $DYNAMIC_PRPLS echo UI Library .................... : GTK + 2. x echo SSL Library / Libraries ......... : $msg_ssl echo Build with Plugin support ..... : $enable_plugins echo Build with Mono support ....... : $enable_mono echo Build with Perl support ....... : $enable_perl echo Build with Tcl support ........ : $enable_tcl echo Build with Tk support ......... : $enable_tk echo Build with Audio support ...... : $enable_audio echo Build with GtkSpell support ... : $enable_gtkspell echo Build with DBUS support ....... : $enable_dbus if test x$enable_dbus = xyes ; then eval echo DBUS servies directory ........ : $DBUS_SERVICES_DIR echo Build with Cyrus SASL support . : $enable_cyrus_sasl echo Has you ....................... : yes echo Use kerberos 4 with zephyr .... : $kerberos echo Use external libzephyr ........ : $zephyr echo Use XScreenSaver Extension .... : $enable_xss echo Use X Session Management ...... : $enable_sm echo Use startup notification ....... : $enable_startup_notification echo Print debugging messages ...... : $enable_debug eval eval echo Gaim will be installed in $bindir . if test "x$gaimpath" != "x" ; then echo Warning : You have an old copy of gaim at $gaimpath . echo configure complete , now type \' make \'