configure.ac

changeset 14503
bb719a93d9e1
parent 14502
06af96a5a07d
child 14504
88f6b47296a9
equal deleted inserted replaced
14502:06af96a5a07d 14503:bb719a93d9e1
81 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, , 81 AC_CHECK_FUNC(inet_aton, , [AC_CHECK_LIB(resolv, inet_aton, ,
82 [AC_ERROR(inet_aton not found)])]) 82 [AC_ERROR(inet_aton not found)])])
83 AC_CHECK_LIB(resolv, __res_query) 83 AC_CHECK_LIB(resolv, __res_query)
84 AC_CHECK_LIB(nsl, gethostent) 84 AC_CHECK_LIB(nsl, gethostent)
85 AC_CHECK_FUNC(socket, , 85 AC_CHECK_FUNC(socket, ,
86 [AC_CHECK_LIB(socket, socket, , [AC_ERROR([socket not found])])]) 86 [AC_CHECK_LIB(socket, socket, , [AC_ERROR([socket not found])])])
87 dnl If all goes well, by this point the previous two checks will have 87 dnl If all goes well, by this point the previous two checks will have
88 dnl pulled in -lsocket and -lnsl if we need them. 88 dnl pulled in -lsocket and -lnsl if we need them.
89 AC_CHECK_FUNC(getaddrinfo, [AC_DEFINE([HAVE_GETADDRINFO], [1], 89 AC_CHECK_FUNC(getaddrinfo,
90 [Define to 1 if you have the getaddrinfo function.])], 90 [AC_DEFINE([HAVE_GETADDRINFO], [1],
91 [AC_CHECK_LIB(socket, getaddrinfo, 91 [Define to 1 if you have the getaddrinfo function.])],
92 [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)]) 92 [AC_CHECK_LIB(socket, getaddrinfo,
93 [AC_DEFINE([HAVE_GETADDRINFO]) LIBS="-lsocket -lsnl $LIBS"], , , -lnsl)])
93 94
94 dnl Check for socklen_t (in Unix98) 95 dnl Check for socklen_t (in Unix98)
95 AC_MSG_CHECKING(for socklen_t) 96 AC_MSG_CHECKING(for socklen_t)
96 AC_TRY_COMPILE([ 97 AC_TRY_COMPILE([
97 #include <sys/types.h> 98 #include <sys/types.h>
144 (buf[2] >= '0' && buf[2] <= '9') && 145 (buf[2] >= '0' && buf[2] <= '9') &&
145 (buf[3] >= '0' && buf[3] <= '9') && 146 (buf[3] >= '0' && buf[3] <= '9') &&
146 (buf[4] >= '0' && buf[4] <= '9') 147 (buf[4] >= '0' && buf[4] <= '9')
147 ); 148 );
148 } 149 }
149 ], 150 ], [
150 [
151 AC_MSG_RESULT(yes) 151 AC_MSG_RESULT(yes)
152 AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1], 152 AC_DEFINE([HAVE_STRFTIME_Z_FORMAT], [1],
153 [Define to 1 if you have a strftime() that supports the %z format string.]) 153 [Define to 1 if you have a strftime() that supports the %z format string.])
154 ], 154 ], [
155 [
156 AC_MSG_RESULT(no) 155 AC_MSG_RESULT(no)
157 ], 156 ], [
158 [
159 # Fallback for Cross Compiling... 157 # Fallback for Cross Compiling...
160 # This will enable the compatibility code. 158 # This will enable the compatibility code.
161 AC_MSG_RESULT(no) 159 AC_MSG_RESULT(no)
162 ] 160 ]
163 ) 161 )
164 162
165 dnl ####################################################################### 163 dnl #######################################################################
166 dnl # GStreamer 164 dnl # Check for LibXML2 (required)
167 dnl ####################################################################### 165 dnl #######################################################################
168 enable_gst=yes
169 PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], ,
170 [
171 AC_MSG_RESULT(no)
172 enable_gst=no
173 ])
174 AC_SUBST(GSTREAMER_CFLAGS)
175 AC_SUBST(GSTREAMER_LIBS)
176 AC_ARG_ENABLE(gstreamer, [AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])], enable_gst=no)
177 if test "x$enable_gst" = "xyes"; then
178 AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for making sounds])
179 fi
180
181 dnl #################
182 dnl # LibXML2
183 dnl #################
184 enable_libxml2=yes
185 PKG_CHECK_MODULES(LIBXML, [libxml-2.0], , 166 PKG_CHECK_MODULES(LIBXML, [libxml-2.0], ,
186 [ 167 [
168 AC_MSG_RESULT(no)
187 AC_MSG_ERROR([ 169 AC_MSG_ERROR([
188 *** libxml2 is required to build Gaim; please make sure you have the 170
189 *** libxml2 development headers installed.]) 171 You must have the libxml2 development headers installed to build Gaim.
190 ]) 172 ])])
191 AC_SUBST(LIBXML_CFLAGS) 173 AC_SUBST(LIBXML_CFLAGS)
192 AC_SUBST(LIBXML_LIBS) 174 AC_SUBST(LIBXML_LIBS)
193 175
194 176 dnl #######################################################################
177 dnl # Check for GStreamer
178 dnl #######################################################################
179 AC_ARG_ENABLE(gstreamer,
180 [AC_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])],
181 enable_gst="no", enable_gst="yes")
182 PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], , [
183 AC_MSG_RESULT(no)
184 enable_gst="no"
185 ])
186 if test "x$enable_gst" != "xno"; then
187 AC_SUBST(GSTREAMER_CFLAGS)
188 AC_SUBST(GSTREAMER_LIBS)
189 AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
190 fi
195 191
196 dnl ####################################################################### 192 dnl #######################################################################
197 dnl # Check for Meanwhile headers (for Sametime) 193 dnl # Check for Meanwhile headers (for Sametime)
198 dnl ####################################################################### 194 dnl #######################################################################
199 PKG_CHECK_MODULES(MEANWHILE, 195 PKG_CHECK_MODULES(MEANWHILE, [meanwhile >= 1.0.0 meanwhile < 2.0.0], [
200 [meanwhile >= 1.0.0 meanwhile < 2.0.0], [
201 have_meanwhile="yes" 196 have_meanwhile="yes"
202 ], [ 197 ], [
203 AC_MSG_RESULT(no) 198 AC_MSG_RESULT(no)
204 have_meanwhile="no" 199 have_meanwhile="no"
205 ]) 200 ])
206 AC_SUBST(MEANWHILE_CFLAGS) 201 AC_SUBST(MEANWHILE_CFLAGS)
207 AC_SUBST(MEANWHILE_LIBS) 202 AC_SUBST(MEANWHILE_LIBS)
208
209
210 203
211 dnl ####################################################################### 204 dnl #######################################################################
212 dnl # Check for Howl headers (for Bonjour) 205 dnl # Check for Howl headers (for Bonjour)
213 dnl ####################################################################### 206 dnl #######################################################################
214 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"]) 207 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"])
253 fi 246 fi
254 AC_CHECK_LIB(howl, sw_discovery_init, [howllibs=yes], [howllibs=no], $HOWL_LIBS) 247 AC_CHECK_LIB(howl, sw_discovery_init, [howllibs=yes], [howllibs=no], $HOWL_LIBS)
255 248
256 AC_SUBST(HOWL_CFLAGS) 249 AC_SUBST(HOWL_CFLAGS)
257 AC_SUBST(HOWL_LIBS) 250 AC_SUBST(HOWL_LIBS)
258
259
260 251
261 dnl ####################################################################### 252 dnl #######################################################################
262 dnl # Check for SILC client includes and libraries 253 dnl # Check for SILC client includes and libraries
263 dnl ####################################################################### 254 dnl #######################################################################
264 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"]) 255 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"])
322 AC_MSG_RESULT(no) 313 AC_MSG_RESULT(no)
323 ]) 314 ])
324 CPPFLAGS="$CPPFLAGS_save" 315 CPPFLAGS="$CPPFLAGS_save"
325 fi 316 fi
326 317
327
328 dnl ####################################################################### 318 dnl #######################################################################
329 dnl # Check for Gadu-Gadu client includes and libraries 319 dnl # Check for Gadu-Gadu client includes and libraries
330 dnl ####################################################################### 320 dnl #######################################################################
331 AC_ARG_WITH(gadu-includes, [AC_HELP_STRING([--with-gadu-includes=DIR], [compile the Gadu-Gadu plugin against includes in DIR])], [ac_gadu_includes="$withval"], [ac_gadu_includes="no"]) 321 AC_ARG_WITH(gadu-includes, [AC_HELP_STRING([--with-gadu-includes=DIR], [compile the Gadu-Gadu plugin against includes in DIR])], [ac_gadu_includes="$withval"], [ac_gadu_includes="no"])
332 AC_ARG_WITH(gadu-libs, [AC_HELP_STRING([--with-gadu-libs=DIR], [compile the Gadu-Gadu plugin against the libs in DIR])], [ac_gadu_libs="$withval"], [ac_gadu_libs="no"]) 322 AC_ARG_WITH(gadu-libs, [AC_HELP_STRING([--with-gadu-libs=DIR], [compile the Gadu-Gadu plugin against the libs in DIR])], [ac_gadu_libs="$withval"], [ac_gadu_libs="no"])
369 #error "libgadu is not compatible with the GPL when compiled with OpenSSL support." 359 #error "libgadu is not compatible with the GPL when compiled with OpenSSL support."
370 #endif 360 #endif
371 ], [ 361 ], [
372 AC_MSG_RESULT(yes) 362 AC_MSG_RESULT(yes)
373 AC_DEFINE([HAVE_LIBGADU], [1], 363 AC_DEFINE([HAVE_LIBGADU], [1],
374 [Define to 1 if you have libgadu.]) 364 [Define to 1 if you have libgadu.])
375 ], [ 365 ], [
376 AC_MSG_RESULT(no) 366 AC_MSG_RESULT(no)
377 echo 367 echo
378 echo 368 echo
379 echo "libgadu is not compatible with the GPL when compiled with OpenSSL support." 369 echo "libgadu is not compatible with the GPL when compiled with OpenSSL support."
469 AC_ARG_WITH(dynamic_prpls, [AC_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`]) 459 AC_ARG_WITH(dynamic_prpls, [AC_HELP_STRING([--with-dynamic-prpls], [specify which protocols to build dynamically])], [DYNAMIC_PRPLS=`echo $withval | $sedpath 's/,/ /g'`])
470 if test "x$DYNAMIC_PRPLS" = "xall" ; then 460 if test "x$DYNAMIC_PRPLS" = "xall" ; then
471 DYNAMIC_PRPLS="bonjour gg irc jabber msn novell oscar qq sametime silc simple yahoo zephyr" 461 DYNAMIC_PRPLS="bonjour gg irc jabber msn novell oscar qq sametime silc simple yahoo zephyr"
472 fi 462 fi
473 if test "x$have_meanwhile" != "xyes"; then 463 if test "x$have_meanwhile" != "xyes"; then
474 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'` 464 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/sametime//'`
475 fi 465 fi
476 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then 466 if test "x$howlincludes" != "xyes" -o "x$howllibs" != "xyes"; then
477 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'` 467 DYNAMIC_PRPLS=`echo $DYNAMIC_PRPLS | $sedpath 's/bonjour//'`
478 fi 468 fi
479 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then 469 if test "x$silcincludes" != "xyes" -o "x$silcclient" != "xyes"; then
515 AM_CONDITIONAL(DYNAMIC_SIMPLE, test "x$dynamic_simple" = "xyes") 505 AM_CONDITIONAL(DYNAMIC_SIMPLE, test "x$dynamic_simple" = "xyes")
516 AM_CONDITIONAL(DYNAMIC_TOC, test "x$dynamic_toc" = "xyes") 506 AM_CONDITIONAL(DYNAMIC_TOC, test "x$dynamic_toc" = "xyes")
517 AM_CONDITIONAL(DYNAMIC_YAHOO, test "x$dynamic_yahoo" = "xyes") 507 AM_CONDITIONAL(DYNAMIC_YAHOO, test "x$dynamic_yahoo" = "xyes")
518 AM_CONDITIONAL(DYNAMIC_ZEPHYR, test "x$dynamic_zephyr" = "xyes") 508 AM_CONDITIONAL(DYNAMIC_ZEPHYR, test "x$dynamic_zephyr" = "xyes")
519 509
520 AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support])], , enable_mono=no)
521 AC_ARG_ENABLE(cap, [AC_HELP_STRING([--enable-cap], [compile with Contact Availability Prediction Plugin])], , enable_cap=no)
522 AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support])], , enable_plugins=yes) 510 AC_ARG_ENABLE(plugins, [AC_HELP_STRING([--disable-plugins], [compile without plugin support])], , enable_plugins=yes)
523 AC_ARG_ENABLE(perl, [AC_HELP_STRING([--disable-perl], [compile without perl scripting])], , enable_perl=yes) 511 AC_ARG_ENABLE(perl, [AC_HELP_STRING([--disable-perl], [compile without perl scripting])], , enable_perl=yes)
524 AC_ARG_ENABLE(tcl, [AC_HELP_STRING([--disable-tcl], [compile without Tcl scripting])], , enable_tcl=yes) 512 AC_ARG_ENABLE(tcl, [AC_HELP_STRING([--disable-tcl], [compile without Tcl scripting])], , enable_tcl=yes)
525 AC_ARG_WITH(tclconfig, [AC_HELP_STRING([--with-tclconfig=DIR], [directory containing tclConfig.sh])]) 513 AC_ARG_WITH(tclconfig, [AC_HELP_STRING([--with-tclconfig=DIR], [directory containing tclConfig.sh])])
526 AC_ARG_ENABLE(tk, [AC_HELP_STRING([--disable-tk], [compile without Tcl support for Tk])], , enable_tk=yes) 514 AC_ARG_ENABLE(tk, [AC_HELP_STRING([--disable-tk], [compile without Tcl support for Tk])], , enable_tk=yes)
527 AC_ARG_WITH(tkconfig, [AC_HELP_STRING([--with-tkconfig=DIR], [directory containing tkConfig.sh])]) 515 AC_ARG_WITH(tkconfig, [AC_HELP_STRING([--with-tkconfig=DIR], [directory containing tkConfig.sh])])
528 AC_ARG_ENABLE(gtkspell, [AC_HELP_STRING([--disable-gtkspell], [compile without GtkSpell automatic spell checking])], , enable_gtkspell=yes)
529 AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], [compile with debugging support])], , enable_debug=no) 516 AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], [compile with debugging support])], , enable_debug=no)
530 AC_ARG_ENABLE(gtkgaim, [AC_HELP_STRING([--disable-gtkgaim], [compile without GtkGaim client])], 517 AC_ARG_ENABLE(gtkgaim, [AC_HELP_STRING([--disable-gtkgaim], [compile without GtkGaim client])],
531 enable_gtk=$enableval, enable_gtk=yes) 518 enable_gtk=$enableval, enable_gtk=yes)
532 AC_ARG_ENABLE(gntgaim, [AC_HELP_STRING([--disable-gntgaim], [compile without GntGaim console client])], 519 AC_ARG_ENABLE(gntgaim, [AC_HELP_STRING([--disable-gntgaim], [compile without GntGaim console client])],
533 enable_gnt=$enableval, enable_gnt=yes) 520 enable_gnt=$enableval, enable_gnt=yes)
635 DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS" 622 DEBUG_CFLAGS="-Wall $DEBUG_CFLAGS"
636 CFLAGS="-g $CFLAGS" 623 CFLAGS="-g $CFLAGS"
637 fi 624 fi
638 AC_SUBST(CFLAGS) 625 AC_SUBST(CFLAGS)
639 626
640 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0.0 gobject-2.0 gmodule-2.0 gthread-2.0],, 627 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.0.0 gobject-2.0 gmodule-2.0 gthread-2.0], ,
641 [ 628 [
642 AC_MSG_ERROR([ 629 AC_MSG_RESULT(no)
643 *** GLib 2.0 is required to build Gaim; please make sure you have the GLib 630 AC_MSG_ERROR([
644 *** development headers installed. The latest version of GLib is 631
645 *** always available at http://www.gtk.org/.]) 632 You must have the GLib 2.0 development headers installed to build Gaim.
646 ]) 633 ])])
647 AC_SUBST(GLIB_CFLAGS) 634 AC_SUBST(GLIB_CFLAGS)
648 AC_SUBST(GLIB_LIBS) 635 AC_SUBST(GLIB_LIBS)
649 636
650 AC_PATH_PROG(gaimpath, gaim) 637 AC_PATH_PROG(gaimpath, gaim)
651 638
652 if test "x$enable_gtk" = "xyes" ; then 639 if test "x$enable_gtk" = "xyes" ; then
653 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.0.0],, 640 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.0.0],,
654 [ 641 [
655 AC_MSG_ERROR([ 642 AC_MSG_RESULT(no)
656 *** GTK+ 2.0 is required to build Gaim. please make sure you have the GTK+ 643 AC_MSG_ERROR([
657 *** development headers installed. The latest version of GTK+ is 644
658 *** always available at http://www.gtk.org/. 645 You must have the GTK+ 2.0 development headers installed to compile Gaim's
659 *** 646 GTK+ interface. If you only want to build the console interface then
660 *** If you wish to build just gntgaim or libgaim, 647 specify --disable-gtkgaim when calling configure.
661 *** configure with --disable-gtkgaim]) 648 ])])
662 ])
663 AC_SUBST(GTK_CFLAGS) 649 AC_SUBST(GTK_CFLAGS)
664 AC_SUBST(GTK_LIBS) 650 AC_SUBST(GTK_LIBS)
665 fi 651 fi
666 652
667 AC_PATH_XTRA 653 AC_PATH_XTRA
677 x_incpath_add= 663 x_incpath_add=
678 else 664 else
679 x_incpath_add="-I$x_includes" 665 x_incpath_add="-I$x_includes"
680 fi 666 fi
681 667
682 PKG_CHECK_MODULES(X11, x11, 668 PKG_CHECK_MODULES(X11, x11,
683 [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])], [AC_MSG_RESULT(no)]) 669 [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])], [AC_MSG_RESULT(no)])
684 AC_SUBST(X11_LIBS) 670 AC_SUBST(X11_LIBS)
685 AC_SUBST(X11_CFLAGS) 671 AC_SUBST(X11_CFLAGS)
686 672
687 dnl ####################################################################### 673 dnl #######################################################################
689 dnl ####################################################################### 675 dnl #######################################################################
690 676
691 AC_ARG_ENABLE(dbus, [AC_HELP_STRING([--enable-dbus], [enable DBUS support])], , enable_dbus=yes) 677 AC_ARG_ENABLE(dbus, [AC_HELP_STRING([--enable-dbus], [enable DBUS support])], , enable_dbus=yes)
692 678
693 if test "x$enable_dbus" = "xyes" ; then 679 if test "x$enable_dbus" = "xyes" ; then
694 AC_CHECK_PROG(enable_dbus, dbus-binding-tool, yes, no) 680 AC_CHECK_PROG(enable_dbus, dbus-binding-tool, yes, no)
695 fi 681 fi
696 682
697 if test "x$enable_dbus" = "xyes" ; then 683 if test "x$enable_dbus" = "xyes" ; then
698 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.35 dbus-glib-1 >= 0.35], 684 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.35 dbus-glib-1 >= 0.35],
699 [ 685 [
705 AC_MSG_RESULT(no) 691 AC_MSG_RESULT(no)
706 enable_dbus=no 692 enable_dbus=no
707 ]) 693 ])
708 fi 694 fi
709 695
710 dnl Why do we need python? 696 dnl #######################################################################
711 697 dnl # Check for Python
712 dnl Python scripts are used to auto-generate about 3000 lines of C 698 dnl #######################################################################
713 dnl and XML code that wraps (part of) the existing Gaim API so that 699
714 dnl it is now accessible through DBUS. 700 dnl Python scripts are used to auto-generate about 3000 lines of C
715 701 dnl and XML code that wraps (part of) the existing Gaim API so that
716 dnl Python is only required if --enable-dbus is used, and only for 702 dnl it is now accessible through DBUS.
717 dnl the build process to generate the code, not for running gaim. 703
718 dnl This autogenerated code is system-independent, so in principle we 704 dnl Python is only required if --enable-dbus is used, and only for
719 dnl can generate all of it before shipping. But I thought adding 705 dnl the build process to generate the code, not for running gaim.
720 dnl auto-generated stuff to the repository is inelegant. 706 dnl This autogenerated code is system-independent, so in principle we
721 dnl Alternatively, these python scripts could be rewritten 707 dnl can generate all of it before shipping. But I thought adding
722 dnl in C (brrrr ...). 708 dnl auto-generated stuff to the repository is inelegant.
709 dnl Alternatively, these python scripts could be rewritten
710 dnl in C (brrrr ...).
723 711
724 AC_ARG_WITH([python], 712 AC_ARG_WITH([python],
725 AC_HELP_STRING([--with-python=PATH], 713 AC_HELP_STRING([--with-python=PATH],
726 [which python interpreter to use for dbus code generation]), 714 [which python interpreter to use for dbus code generation]),
727 PYTHON=$withval) 715 PYTHON=$withval)
792 else 780 else
793 DBUS_SERVICES_DIR="$datadir/dbus-1/services" 781 DBUS_SERVICES_DIR="$datadir/dbus-1/services"
794 fi 782 fi
795 fi 783 fi
796 AC_MSG_RESULT([$DBUS_SERVICES_DIR]) 784 AC_MSG_RESULT([$DBUS_SERVICES_DIR])
797 AC_DEFINE(HAVE_DBUS, 1, [Define if we are re using DBUS.]) 785 AC_DEFINE(HAVE_DBUS, 1, [Define if we are re using DBUS.])
798 fi 786 fi
799 AC_SUBST(DBUS_SERVICES_DIR) 787 AC_SUBST(DBUS_SERVICES_DIR)
800 788
801 if test "x$enable_dbus" = "xyes" ; then 789 if test "x$enable_dbus" = "xyes" ; then
802 echo "Building with DBUS support" 790 echo "Building with DBUS support"
803 else 791 else
804 echo "Building without DBUS support" 792 echo "Building without DBUS support"
805 fi 793 fi
806 794
807 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes") 795 AM_CONDITIONAL(ENABLE_DBUS, test "x$enable_dbus" = "xyes")
808 796
809 dnl ####################################################################### 797 dnl #######################################################################
871 dnl # XScreenSaver, X session management, GtkSpell only if GTK+ was found 859 dnl # XScreenSaver, X session management, GtkSpell only if GTK+ was found
872 dnl ####################################################################### 860 dnl #######################################################################
873 861
874 if test "x$enable_gtk" = "xyes"; then 862 if test "x$enable_gtk" = "xyes"; then
875 863
876 dnl ####################################################################### 864 dnl #######################################################################
877 dnl # Check for startup notification 865 dnl # Check for startup notification
878 dnl ####################################################################### 866 dnl #######################################################################
879 AC_ARG_ENABLE(startup-notification, [AC_HELP_STRING([--disable-startup-notification], [compile without startup notification support])], , enable_startup_notification=yes) 867 AC_ARG_ENABLE(startup-notification, [AC_HELP_STRING([--disable-startup-notification], [compile without startup notification support])], , enable_startup_notification=yes)
880 868
881 if test "x$enable_startup_notification" = "xyes"; then 869 if test "x$enable_startup_notification" = "xyes"; then
882 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5, 870 PKG_CHECK_MODULES(STARTUP_NOTIFICATION, libstartup-notification-1.0 >= 0.5,
883 [ 871 [
884 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.]) 872 AC_DEFINE(HAVE_STARTUP_NOTIFICATION, 1, [Define if we're using libstartup-notification.])
885 enable_startup_notification=yes 873 enable_startup_notification=yes
886 ], 874 ], [
887 [ 875 AC_MSG_RESULT(no)
888 AC_MSG_RESULT(no) 876 enable_startup_notification=no
889 enable_startup_notification=no 877 ])
890 ]) 878
891 879 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS)
892 AC_SUBST(STARTUP_NOTIFICATION_CFLAGS) 880 AC_SUBST(STARTUP_NOTIFICATION_LIBS)
893 AC_SUBST(STARTUP_NOTIFICATION_LIBS) 881 fi
894 fi 882
895 883 dnl #######################################################################
896 dnl ####################################################################### 884 dnl # Check for stuff needed by the evolution integration plugin.
897 dnl # Check for stuff needed by the evolution integration plugin. 885 dnl #######################################################################
898 dnl ####################################################################### 886 build_gevo=no
899 build_gevo=no 887 AC_ARG_ENABLE(gevolution, [AC_HELP_STRING([--disable-gevolution], [compile without the Gaim-Evolution plugin])], , enable_gevolution=yes)
900 AC_ARG_ENABLE(gevolution, [AC_HELP_STRING([--disable-gevolution], [compile without the Gaim-Evolution plugin])], , enable_gevolution=yes) 888
901 889 if test "x$enable_gevolution" = "xyes"; then
902 if test "x$enable_gevolution" = "xyes"; then 890 evo_deps="libebook-1.2 libedata-book-1.2"
903 evo_deps="libebook-1.2 libedata-book-1.2"
904 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [
905 AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.])
906 build_gevo=yes
907 ], [
908 AC_MSG_RESULT(yes)
909 build_gevo=no
910 ])
911 if test "x$build_gevo" = "xno"; then
912 evo_deps="libebook-1.0 libedata-book-1.0"
913 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [ 891 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [
914 AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.]) 892 AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.])
915 build_gevo=yes 893 build_gevo=yes
916 ], [ 894 ], [
917 AC_MSG_RESULT(yes) 895 AC_MSG_RESULT(yes)
918 build_gevo=no 896 build_gevo=no
919 ]) 897 ])
920 fi 898 if test "x$build_gevo" = "xno"; then
921 899 evo_deps="libebook-1.0 libedata-book-1.0"
922 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS) 900 PKG_CHECK_MODULES(EVOLUTION_ADDRESSBOOK, $evo_deps, [
923 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS) 901 AC_DEFINE(HAVE_EVOLUTION_ADDRESSBOOK, 1, [Define if we're using evolution addressbook.])
924 fi 902 build_gevo=yes
925 903 ], [
926 dnl ####################################################################### 904 AC_MSG_RESULT(yes)
927 dnl # Check for XScreenSaver 905 build_gevo=no
928 dnl ####################################################################### 906 ])
929 if test "x$enable_xss" = "xyes" ; then 907 fi
930 old_LIBS="$LIBS" 908
931 LIBS="$LIBS $GTK_LIBS $x_libpath_add" 909 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
932 XSS_LIBS="no" 910 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
933 XSS_HEADERS="no" 911 fi
934 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm]) 912
935 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm]) 913 dnl #######################################################################
936 if test \! "$XSS_LIBS" = "no"; then 914 dnl # Check for XScreenSaver
937 oldCPPFLAGS="$CPPFLAGS" 915 dnl #######################################################################
938 CPPFLAGS="$CPPFLAGS $x_incpath_add" 916 if test "x$enable_xss" = "xyes" ; then
939 AC_TRY_COMPILE([ 917 old_LIBS="$LIBS"
940 #include <X11/Xlib.h> 918 LIBS="$LIBS $GTK_LIBS $x_libpath_add"
941 #include <X11/extensions/scrnsaver.h> 919 XSS_LIBS="no"
942 ],[],[ 920 XSS_HEADERS="no"
943 AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.])],[enable_xss=no] 921 AC_CHECK_LIB(Xext, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"],[],[-lX11 -lXext -lm])
944 ) 922 AC_CHECK_LIB(Xss, XScreenSaverRegister,[XSS_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext $X_LIBS $X_EXTRA_LIBS -lXss"],[],[-lX11 -lXext -lm])
945 CPPFLAGS="$oldCPPFLAGS" 923 if test \! "$XSS_LIBS" = "no"; then
924 oldCPPFLAGS="$CPPFLAGS"
925 CPPFLAGS="$CPPFLAGS $x_incpath_add"
926 AC_TRY_COMPILE([
927 #include <X11/Xlib.h>
928 #include <X11/extensions/scrnsaver.h>
929 ],[],[
930 AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.])],[enable_xss=no]
931 )
932 CPPFLAGS="$oldCPPFLAGS"
933 else
934 XSS_LIBS=""
935 enable_xss=no
936 fi
937 LIBS="$old_LIBS"
946 else 938 else
947 XSS_LIBS="" 939 XSS_LIBS=""
948 enable_xss=no 940 enable_xss=no
949 fi 941 fi
950 LIBS="$old_LIBS" 942 AC_SUBST(XSS_LIBS)
951 else 943
952 XSS_LIBS="" 944 dnl #######################################################################
953 enable_xss=no 945 dnl # Check for X session management libs
954 fi 946 dnl #######################################################################
955 AC_SUBST(XSS_LIBS) 947 if test "x$enable_sm" = "xyes"; then
956 948 enable_sm=no
957 949 AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE])
958 dnl ####################################################################### 950 if test "$found_sm_lib" = "true"; then
959 dnl # Check for X session management libs 951 oldCPPFLAGS="$CPPFLAGS"
960 dnl ####################################################################### 952 CPPFLAGS="$CPPFLAGS $x_incpath_add"
961 if test "x$enable_sm" = "xyes"; then 953 AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes)
962 enable_sm=no 954 CPPFLAGS="$oldCPPFLAGS"
963 AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE]) 955 fi
964 if test "$found_sm_lib" = "true"; then 956 else
965 oldCPPFLAGS="$CPPFLAGS" 957 SM_LIBS=""
966 CPPFLAGS="$CPPFLAGS $x_incpath_add" 958 enable_sm=no
967 AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes) 959 fi
968 CPPFLAGS="$oldCPPFLAGS" 960 AC_SUBST(SM_LIBS)
969 fi 961 if test "$enable_sm" = "yes"; then
970 else 962 AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.])
971 SM_LIBS="" 963 fi
972 enable_sm=no 964
973 fi 965 AC_DEFUN([GC_TM_GMTOFF],
974 AC_SUBST(SM_LIBS) 966 [AC_REQUIRE([AC_STRUCT_TM])dnl
975 if test "$enable_sm" = "yes"; then 967 AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
976 AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.]) 968 [AC_TRY_COMPILE([#include <sys/types.h>
977 fi 969 #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
978 970 ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
979 AC_DEFUN([GC_TM_GMTOFF], 971 if test "$ac_cv_struct_tm_gmtoff" = yes; then
980 [AC_REQUIRE([AC_STRUCT_TM])dnl 972 AC_DEFINE(HAVE_TM_GMTOFF, 1, [tm_gmtoff is available.])
981 AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, 973 fi
982 [AC_TRY_COMPILE([#include <sys/types.h>
983 #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;],
984 ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
985 if test "$ac_cv_struct_tm_gmtoff" = yes; then
986 AC_DEFINE(HAVE_TM_GMTOFF, 1, [tm_gmtoff is available.])
987 fi
988 ])
989
990 dnl Thanks, Evan.
991 if test "$enable_gtkspell" = yes ; then
992 PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, [], [
993 AC_MSG_RESULT(no)
994 enable_gtkspell=no
995 ]) 974 ])
996 if test "$enable_gtkspell" = "yes" ; then 975
997 AC_SUBST(GTKSPELL_CFLAGS) 976 dnl #######################################################################
998 AC_SUBST(GTKSPELL_LIBS) 977 dnl # Check for GtkSpell
999 AC_DEFINE(USE_GTKSPELL,,[do we have gtkspell?]) 978 dnl #######################################################################
1000 fi 979 AC_ARG_ENABLE(gtkspell, [AC_HELP_STRING([--disable-gtkspell], [compile without GtkSpell automatic spell checking])], , enable_gtkspell=yes)
1001 fi 980 if test "$enable_gtkspell" = yes ; then
981 PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.2, [], [
982 AC_MSG_RESULT(no)
983 enable_gtkspell=no
984 ])
985 if test "$enable_gtkspell" = "yes" ; then
986 AC_SUBST(GTKSPELL_CFLAGS)
987 AC_SUBST(GTKSPELL_LIBS)
988 AC_DEFINE(USE_GTKSPELL,,[do we have gtkspell?])
989 fi
990 fi
1002 else # GTK 991 else # GTK
1003 enable_gevolution=no 992 enable_gevolution=no
1004 enable_sm=no 993 enable_sm=no
1005 enable_xss=no 994 enable_xss=no
1006 enable_startup_notification=no 995 enable_startup_notification=no
1012 AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$build_gevo" = "xyes") 1001 AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$build_gevo" = "xyes")
1013 1002
1014 GC_TM_GMTOFF 1003 GC_TM_GMTOFF
1015 1004
1016 dnl ####################################################################### 1005 dnl #######################################################################
1017 dnl # Contact Availability Prediction (CAP) 1006 dnl # Check for libdbi (Contact Availability Prediction plugin)
1018 dnl ####################################################################### 1007 dnl #######################################################################
1008 AC_ARG_ENABLE(cap, [AC_HELP_STRING([--enable-cap], [compile with Contact Availability Prediction Plugin])], , enable_cap=no)
1019 if test "x$enable_cap" = "xyes"; then 1009 if test "x$enable_cap" = "xyes"; then
1020 AC_CHECK_HEADERS(dbi/dbi.h, [], enable_cap=no) 1010 AC_CHECK_HEADERS(dbi/dbi.h, [], enable_cap=no)
1021 fi 1011 fi
1022 if test "x$enable_cap" = "xyes"; then 1012 if test "x$enable_cap" = "xyes"; then
1023 AC_CHECK_LIB(dbi, dbi_result_field_is_null, [CAP_LIBS="-ldbi"], [enable_cap=no]) 1013 AC_CHECK_LIB(dbi, dbi_result_field_is_null, [CAP_LIBS="-ldbi"], [enable_cap=no])
1026 AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes") 1016 AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes")
1027 1017
1028 dnl ####################################################################### 1018 dnl #######################################################################
1029 dnl # Check for Mono support 1019 dnl # Check for Mono support
1030 dnl ####################################################################### 1020 dnl #######################################################################
1031 1021 AC_ARG_ENABLE(mono, [AC_HELP_STRING([--enable-mono], [compile with Mono runtime support])], , enable_mono=no)
1032 if test x"$enable_mono" = x"yes" ; then 1022 if test x"$enable_mono" = x"yes" ; then
1033 AC_MSG_CHECKING(for Mono compile flags) 1023 AC_MSG_CHECKING(for Mono compile flags)
1034 MONO_CFLAGS=`pkg-config --cflags mono 2> /dev/null` 1024 MONO_CFLAGS=`pkg-config --cflags mono 2> /dev/null`
1035 if test $? != 0 ; then 1025 if test $? != 0 ; then
1036 AC_MSG_RESULT([not found, building without mono.]) 1026 AC_MSG_RESULT([not found, building without mono.])
1140 prefix=`eval echo $prefix` 1130 prefix=`eval echo $prefix`
1141 PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=$prefix" 1131 PERL_MM_PARAMS="INSTALLDIRS=vendor PREFIX=$prefix"
1142 fi 1132 fi
1143 1133
1144 AC_ARG_WITH(perl-lib, 1134 AC_ARG_WITH(perl-lib,
1145 [AC_HELP_STRING([--with-perl-lib=[site|vendor|DIR]], [specify where to install the 1135 [AC_HELP_STRING([--with-perl-lib=[site|vendor|DIR]],
1146 Perl libraries for gaim. Default is site.])], 1136 [specify where to install the Perl libraries for gaim. Default is site.])],
1147 [ 1137 [
1148 if test "x$withval" = xsite; then 1138 if test "x$withval" = xsite; then
1149 PERL_MM_PARAMS="" 1139 PERL_MM_PARAMS=""
1150 elif test "x$withval" = xvendor; then 1140 elif test "x$withval" = xvendor; then
1151 if test -z "`$perlpath -v | grep '5\.0'`"; then 1141 if test -z "`$perlpath -v | grep '5\.0'`"; then
1577 msg_ssl=$msg_nss 1567 msg_ssl=$msg_nss
1578 elif test "x$msg_gnutls" != "x"; then 1568 elif test "x$msg_gnutls" != "x"; then
1579 msg_ssl=$msg_gnutls 1569 msg_ssl=$msg_gnutls
1580 fi 1570 fi
1581 1571
1582 dnl Check for Tcl 1572 dnl #######################################################################
1573 dnl # Check for Tcl
1574 dnl #######################################################################
1583 if test "$enable_plugins" = no; then 1575 if test "$enable_plugins" = no; then
1584 enable_tcl=no 1576 enable_tcl=no
1585 fi 1577 fi
1586 1578
1587 if test "$enable_tcl" = yes; then 1579 if test "$enable_tcl" = yes; then
1588 AC_MSG_CHECKING([for tclConfig.sh]) 1580 AC_MSG_CHECKING([for tclConfig.sh])
1589 TCLCONFIG=no 1581 TCLCONFIG=no
1590 TCLCONFIGDIRS="/usr/lib \ 1582 TCLCONFIGDIRS="/usr/lib \
1591 /usr/lib64 \ 1583 /usr/lib64 \
1592 /usr/lib/tcl8.4 \ 1584 /usr/lib/tcl8.4 \
1593 /usr/lib/tcl8.3 \ 1585 /usr/lib/tcl8.3 \
1594 /usr/lib/tcl8.2 \ 1586 /usr/lib/tcl8.2 \
1595 /System/Library/Tcl/8.3 \ 1587 /System/Library/Tcl/8.3 \
1596 /usr/local/lib" 1588 /usr/local/lib"
1597 for dir in $with_tclconfig $TCLCONFIGDIRS; do 1589 for dir in $with_tclconfig $TCLCONFIGDIRS; do
1598 if test -f $dir/tclConfig.sh; then 1590 if test -f $dir/tclConfig.sh; then
1599 TCLCONFIG=$dir/tclConfig.sh 1591 TCLCONFIG=$dir/tclConfig.sh
1600 AC_MSG_RESULT([yes ($TCLCONFIG)]) 1592 AC_MSG_RESULT([yes ($TCLCONFIG)])
1601 fi 1593 fi
1616 oldCPPFLAGS=$CPPFLAGS 1608 oldCPPFLAGS=$CPPFLAGS
1617 CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include" 1609 CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC -I$TCL_PREFIX/include"
1618 oldLIBS=$LIBS 1610 oldLIBS=$LIBS
1619 LIBS="$LIBS $TCL_LIB_SPEC" 1611 LIBS="$LIBS $TCL_LIB_SPEC"
1620 AC_TRY_LINK([#include <tcl.h>], 1612 AC_TRY_LINK([#include <tcl.h>],
1621 [Tcl_Interp *interp=NULL; Tcl_Init(interp)], 1613 [Tcl_Interp *interp=NULL; Tcl_Init(interp)],
1622 [AC_MSG_RESULT([yes]);enable_tcl=yes], 1614 [AC_MSG_RESULT([yes]);enable_tcl=yes],
1623 [AC_MSG_RESULT([no]);enable_tcl=no]) 1615 [AC_MSG_RESULT([no]);enable_tcl=no])
1624 CPPFLAGS="$oldCPPFLAGS" 1616 CPPFLAGS="$oldCPPFLAGS"
1625 LIBS="$oldLIBS" 1617 LIBS="$oldLIBS"
1626 fi 1618 fi
1627 fi 1619 fi
1628 fi 1620 fi
1639 AC_SUBST(TCL_CFLAGS) 1631 AC_SUBST(TCL_CFLAGS)
1640 else 1632 else
1641 AM_CONDITIONAL(USE_TCL, false) 1633 AM_CONDITIONAL(USE_TCL, false)
1642 fi 1634 fi
1643 1635
1644 dnl Check for Tk 1636 dnl #######################################################################
1637 dnl # Check for Tk
1638 dnl #######################################################################
1645 if test "$enable_tcl" = yes -a "$enable_tk" = yes; then 1639 if test "$enable_tcl" = yes -a "$enable_tk" = yes; then
1646 AC_MSG_CHECKING([for tkConfig.sh]) 1640 AC_MSG_CHECKING([for tkConfig.sh])
1647 TKCONFIG=no 1641 TKCONFIG=no
1648 TKCONFIGDIRS="/usr/lib \ 1642 TKCONFIGDIRS="/usr/lib \
1649 /usr/lib64 \ 1643 /usr/lib64 \
1650 /usr/lib/tk8.4 \ 1644 /usr/lib/tk8.4 \
1651 /usr/lib/tk8.3 \ 1645 /usr/lib/tk8.3 \
1652 /usr/lib/tk8.2 \ 1646 /usr/lib/tk8.2 \
1653 /usr/local/lib" 1647 /usr/local/lib"
1654 for dir in $with_tkconfig $TKCONFIGDIRS; do 1648 for dir in $with_tkconfig $TKCONFIGDIRS; do
1655 if test -f $dir/tkConfig.sh; then 1649 if test -f $dir/tkConfig.sh; then
1656 TKCONFIG=$dir/tkConfig.sh 1650 TKCONFIG=$dir/tkConfig.sh
1657 AC_MSG_RESULT([yes ($TKCONFIG)]) 1651 AC_MSG_RESULT([yes ($TKCONFIG)])
1658 fi 1652 fi
1667 oldCPPFLAGS=$CPPFLAGS 1661 oldCPPFLAGS=$CPPFLAGS
1668 CPPFLAGS="$CPPFLAGS $TCL_CFLAGS" 1662 CPPFLAGS="$CPPFLAGS $TCL_CFLAGS"
1669 oldLIBS=$LIBS 1663 oldLIBS=$LIBS
1670 LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC" 1664 LIBS="$LIBS $TCL_LIB_SPEC $TK_LIB_SPEC"
1671 AC_TRY_LINK([#include <tk.h>], 1665 AC_TRY_LINK([#include <tk.h>],
1672 [Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);], 1666 [Tcl_Interp *interp=NULL; Tcl_Init(interp); Tk_Init(interp);],
1673 [AC_MSG_RESULT([yes]);enable_tk=yes], 1667 [AC_MSG_RESULT([yes]);enable_tk=yes],
1674 [AC_MSG_RESULT([no]);enable_tk=no]) 1668 [AC_MSG_RESULT([no]);enable_tk=no])
1675 CPPFLAGS="$oldCPPFLAGS" 1669 CPPFLAGS="$oldCPPFLAGS"
1676 LIBS="$oldLIBS" 1670 LIBS="$oldLIBS"
1677 fi 1671 fi
1678 else 1672 else
1679 enable_tk=no 1673 enable_tk=no
1711 else 1705 else
1712 AM_CONDITIONAL(PRPLS, false) 1706 AM_CONDITIONAL(PRPLS, false)
1713 enable_prpls=no 1707 enable_prpls=no
1714 fi 1708 fi
1715 1709
1716 dnl checks for jabber 1710 dnl #######################################################################
1711 dnl # Check for Cyrus-SASL (for Jabber)
1712 dnl #######################################################################
1717 dnl AC_CHECK_SIZEOF(short) 1713 dnl AC_CHECK_SIZEOF(short)
1718 AC_CHECK_FUNCS(snprintf connect) 1714 AC_CHECK_FUNCS(snprintf connect)
1719 AC_SUBST(SASL_LIBS) 1715 AC_SUBST(SASL_LIBS)
1720 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) 1716 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)
1721 if test "x-$enable_cyrus_sasl" = "x-yes" ; then 1717 if test "x$enable_cyrus_sasl" = "xyes" ; then
1722 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)]) 1718 AC_CHECK_LIB(sasl2, sasl_client_init, [
1723 fi 1719 AC_DEFINE(HAVE_CYRUS_SASL, [1], [Define to 1 if Cyrus SASL is present])
1724 1720 SASL_LIBS=-"lsasl2"
1725 dnl checks for zephyr 1721 ], [
1722 AC_ERROR(Cyrus SASL library not found)
1723 ])
1724 fi
1725
1726 dnl #######################################################################
1727 dnl # Check for Kerberos (for Zephyr)
1728 dnl #######################################################################
1726 AC_DEFINE(ZEPHYR_INT32, long, [Size of an int32.]) 1729 AC_DEFINE(ZEPHYR_INT32, long, [Size of an int32.])
1727 AC_SUBST(KRB4_CFLAGS) 1730 AC_SUBST(KRB4_CFLAGS)
1728 AC_SUBST(KRB4_LDFLAGS) 1731 AC_SUBST(KRB4_LDFLAGS)
1729 AC_SUBST(KRB4_LIBS) 1732 AC_SUBST(KRB4_LIBS)
1730 if test "$kerberos" != "no" ; then 1733 if test "$kerberos" != "no" ; then
1756 AC_CHECK_FUNCS(krb_get_err_text krb_log) 1759 AC_CHECK_FUNCS(krb_get_err_text krb_log)
1757 LIBS="$orig_LIBS" 1760 LIBS="$orig_LIBS"
1758 LDFLAGS="$orig_LDFLAGS" 1761 LDFLAGS="$orig_LDFLAGS"
1759 fi 1762 fi
1760 1763
1761 dnl checks for an external libzephyr 1764 dnl #######################################################################
1765 dnl # Check for external libzephyr
1766 dnl #######################################################################
1762 AC_SUBST(ZEPHYR_CFLAGS) 1767 AC_SUBST(ZEPHYR_CFLAGS)
1763 AC_SUBST(ZEPHYR_LDFLAGS) 1768 AC_SUBST(ZEPHYR_LDFLAGS)
1764 AC_SUBST(ZEPHYR_LIBS) 1769 AC_SUBST(ZEPHYR_LIBS)
1765 if test "$zephyr" != "no" ; then 1770 if test "$zephyr" != "no" ; then
1766 if test "$zephyr" != "yes" ; then 1771 if test "$zephyr" != "yes" ; then
1767 ZEPHYR_CFLAGS="-I${zephyr}/include" 1772 ZEPHYR_CFLAGS="-I${zephyr}/include"
1768 ZEPHYR_LDFLAGS="-L${zephyr}/lib" 1773 ZEPHYR_LDFLAGS="-L${zephyr}/lib"
1769 elif test -d /usr/athena/include/zephyr ; then 1774 elif test -d /usr/athena/include/zephyr ; then
1770 ZEPHYR_CFLAGS="-I/usr/athena/include" 1775 ZEPHYR_CFLAGS="-I/usr/athena/include"
1771 elif test -d /usr/include/zephyr ; then 1776 elif test -d /usr/include/zephyr ; then
1772 ZEPHYR_CFLAGS="-I/usr/include" 1777 ZEPHYR_CFLAGS="-I/usr/include"
1776 AC_DEFINE(LIBZEPHYR_EXT, 1 , [Define if external libzephyr should be used.]) 1781 AC_DEFINE(LIBZEPHYR_EXT, 1 , [Define if external libzephyr should be used.])
1777 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno") 1782 AM_CONDITIONAL(EXTERNAL_LIBZEPHYR, test "x$zephyr" != "xno")
1778 orig_LDFLAGS="$LDFLAGS" 1783 orig_LDFLAGS="$LDFLAGS"
1779 LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS" 1784 LDFLAGS="$LDFLAGS $ZEPHYR_LDFLAGS"
1780 AC_CHECK_LIB(zephyr, ZInitialize, 1785 AC_CHECK_LIB(zephyr, ZInitialize,
1781 [ZEPHYR_LIBS="-lzephyr"], 1786 [ZEPHYR_LIBS="-lzephyr"],
1782 [AC_ERROR(Zephyr libraries not found)], 1787 [AC_ERROR(Zephyr libraries not found)],
1783 -lzephyr) 1788 -lzephyr)
1784 orig_LIBS="$LIBS" 1789 orig_LIBS="$LIBS"
1785 LIBS="$orig_LIBS" 1790 LIBS="$orig_LIBS"
1786 LDFLAGS="$orig_LDFLAGS" 1791 LDFLAGS="$orig_LDFLAGS"
1787 fi 1792 fi
1788 1793
1797 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h) 1802 AC_CHECK_HEADERS(sys/select.h sys/uio.h sys/utsname.h sys/wait.h)
1798 AC_CHECK_HEADERS(termios.h) 1803 AC_CHECK_HEADERS(termios.h)
1799 AC_VAR_TIMEZONE_EXTERNALS 1804 AC_VAR_TIMEZONE_EXTERNALS
1800 1805
1801 dnl ####################################################################### 1806 dnl #######################################################################
1802 dnl # Doxygen Stuff 1807 dnl # Check for Doxygen and dot (part of GraphViz)
1803 dnl ####################################################################### 1808 dnl #######################################################################
1804 AC_ARG_ENABLE(doxygen, [AC_HELP_STRING([--enable-doxygen], [enable documentation with doxygen])],,enable_doxygen=yes) 1809 AC_ARG_ENABLE(doxygen, [AC_HELP_STRING([--enable-doxygen], [enable documentation with doxygen])],,enable_doxygen=yes)
1805 AC_ARG_ENABLE(dot, [AC_HELP_STRING([--enable-dot], [enable graphs in doxygen via 'dot'])],,enable_dot=yes) 1810 AC_ARG_ENABLE(dot, [AC_HELP_STRING([--enable-dot], [enable graphs in doxygen via 'dot'])],,enable_dot=yes)
1806 1811
1807 if test "x$enable_doxygen" = xyes; then 1812 if test "x$enable_doxygen" = xyes; then

mercurial