Mercurial > pidgin
changeset 19478:b2578b2d4bc4
Remove X11 specifics from configure.ac. Allows to build against native, non-X11 Quartz
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Mon, 27 Aug 2007 22:45:15 +0000 |
parents | b1e7dfd662fb |
children | 51a873c91a20 |
files | COPYRIGHT ChangeLog configure.ac pidgin/gtkconv.c pidgin/pidgin.h pidgin/plugins/Makefile.am |
diffstat | 6 files changed, 85 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- a/COPYRIGHT Mon Aug 27 22:20:13 2007 +0000 +++ b/COPYRIGHT Mon Aug 27 22:45:15 2007 +0000 @@ -156,6 +156,7 @@ Casey Harkins Andy Harrison Andrew Hart (arhart) +Anders Hasselqvist Rene Hausleitner Will Hawkins G. Sumner Hayes
--- a/ChangeLog Mon Aug 27 22:20:13 2007 +0000 +++ b/ChangeLog Mon Aug 27 22:45:15 2007 +0000 @@ -9,6 +9,8 @@ * Insert Horizontal Rules and Strikethrough text from toolbar * Option to show protocol icons in the buddy list, from the Buddies > Show menu (Justin Heiner) + * Ability to build with native, non-X11 GTK+ on OSX (Anders + Hasselqvist) Finch: * Per-conversation mute and logging options (accessible from the menu)
--- a/configure.ac Mon Aug 27 22:20:13 2007 +0000 +++ b/configure.ac Mon Aug 27 22:45:15 2007 +0000 @@ -275,6 +275,8 @@ AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) +AC_ARG_WITH(x, [], + with_x="$withval", with_x="yes") AC_ARG_ENABLE(gtkui, [AC_HELP_STRING([--disable-gtkui], [compile without GTK+ user interface])], enable_gtkui="$enableval", enable_gtkui="yes") @@ -309,7 +311,10 @@ [AC_HELP_STRING([--disable-cap], [compile without Contact Availability Prediction plugin])], enable_cap="$enableval", enable_cap="yes") - +AC_ARG_ENABLE(gestures, + [AC_HELP_STRING([--disable-gestures], + [compile without the gestures plugin])], + enable_gestures="$enableval", enable_gestures="yes") AC_PATH_XTRA # We can't assume that $x_libraries will be set, because autoconf does not @@ -343,50 +348,79 @@ AC_DEFINE(HAVE_PANGO14, 1, [Define if we have Pango 1.4 or newer.]),:) dnl ####################################################################### + dnl # Check if we should compile with X support + dnl ####################################################################### + if test "x$with_x" = "xyes" ; then + PKG_CHECK_MODULES(X11, x11, + [AC_DEFINE(HAVE_X, 1, [Define to 1 if you have X11])], + [AC_MSG_RESULT(no) + with_x=no]) + AC_SUBST(X11_LIBS) + AC_SUBST(X11_CFLAGS) + fi + + dnl ####################################################################### dnl # Check for XScreenSaver dnl ####################################################################### if test "x$enable_screensaver" = "xyes" ; then - old_LIBS="$LIBS" - LIBS="$LIBS $GTK_LIBS $x_libpath_add" - XSS_LIBS="" - XSS_HEADERS="" - 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 "x$XSS_LIBS" != "x"; then - oldCPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $x_incpath_add" - AC_TRY_COMPILE([ + if test "x$with_x" = "xyes" ; then + old_LIBS="$LIBS" + LIBS="$LIBS $GTK_LIBS $x_libpath_add" + XSS_LIBS="" + XSS_HEADERS="" + 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 "x$XSS_LIBS" != "x"; then + oldCPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $x_incpath_add" + AC_TRY_COMPILE([ #include <X11/Xlib.h> #include <X11/extensions/scrnsaver.h> - ], [], [], [enable_screensaver=no]) - CPPFLAGS="$oldCPPFLAGS" + ], [], [], [enable_screensaver=no]) + CPPFLAGS="$oldCPPFLAGS" + else + enable_screensaver=no + fi + LIBS="$old_LIBS" + + if test "x$enable_screensaver" = "xyes" ; then + AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.]) + AC_SUBST(XSS_LIBS) + fi else enable_screensaver=no fi - LIBS="$old_LIBS" - - if test "x$enable_screensaver" = "xyes" ; then - AC_DEFINE(USE_SCREENSAVER, 1, [Define if we're using XScreenSaver.]) - AC_SUBST(XSS_LIBS) - fi fi dnl ####################################################################### dnl # Check for X session management libs dnl ####################################################################### if test "x$enable_sm" = "xyes"; then - enable_sm=no - AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE]) - if test "x$found_sm_lib" = "xtrue"; then - oldCPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $x_incpath_add" - AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes) - CPPFLAGS="$oldCPPFLAGS" + if test "x$with_x" = "xyes" ; then + enable_sm=no + AC_CHECK_LIB(SM, SmcSaveYourselfDone, found_sm_lib=true, , [$x_libpath_add -lICE]) + if test "x$found_sm_lib" = "xtrue"; then + oldCPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $x_incpath_add" + AC_CHECK_HEADERS(X11/SM/SMlib.h, SM_LIBS="$x_libpath_add -lSM -lICE" enable_sm=yes) + CPPFLAGS="$oldCPPFLAGS" + fi + + if test "x$enable_sm" = "xyes"; then + AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.]) + AC_SUBST(SM_LIBS) + fi + else + enable_sm=no fi + fi - if test "x$enable_sm" = "xyes"; then - AC_DEFINE(USE_SM, 1, [Define if we're using X Session Management.]) - AC_SUBST(SM_LIBS) + dnl ####################################################################### + dnl # Check for X11 to allow the gestures plugin + dnl ####################################################################### + if test "x$enable_gestures" = "xyes"; then + if test "x$with_x" = "xno" ; then + enable_gestures=no fi fi @@ -450,10 +484,11 @@ dnl ####################################################################### if test "x$enable_cap" = "xyes"; then PKG_CHECK_MODULES(SQLITE3, sqlite3 >= 3.3,,[ - AC_MSG_RESULT(no) - enable_cap="no" - ]) + AC_MSG_RESULT(no) + enable_cap="no" + ]) fi + else # GTK enable_cap=no @@ -467,6 +502,8 @@ AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtkui" = "xyes") AM_CONDITIONAL(BUILD_GEVOLUTION, test "x$enable_gevolution" = "xyes") AM_CONDITIONAL(ENABLE_CAP, test "x$enable_cap" = "xyes") +AM_CONDITIONAL(ENABLE_GESTURES, test "x$enable_gestures" = "xyes") + dnl ####################################################################### dnl # Check for ncurses and other things used by the console UI @@ -531,11 +568,6 @@ fi fi fi - - PKG_CHECK_MODULES(X11, x11, - [AC_DEFINE(HAVE_X11, 1, [Define to 1 if you have X11])], [AC_MSG_RESULT(no)]) - AC_SUBST(X11_LIBS) - AC_SUBST(X11_CFLAGS) fi AC_SUBST(GNT_LIBS) @@ -2224,7 +2256,9 @@ echo echo Build GTK+ 2.x UI............. : $enable_gtkui echo Build console UI.............. : $enable_consoleui +echo Build for X11................. : $with_x echo +echo Enable Gestures............... : $enable_gestures echo Protocols to build dynamically : $DYNAMIC_PRPLS echo Protocols to link statically.. : $STATIC_PRPLS echo
--- a/pidgin/gtkconv.c Mon Aug 27 22:20:13 2007 +0000 +++ b/pidgin/gtkconv.c Mon Aug 27 22:45:15 2007 +0000 @@ -4535,15 +4535,16 @@ gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(gtkconv->infopane), rend, "markup", CONV_TEXT_COLUMN, NULL); g_object_set(rend, "ypad", 0, "yalign", 0.5, NULL); +#if GTK_CHECK_VERSION(2, 6, 0) + g_object_set(rend, "ellipsize", PANGO_ELLIPSIZE_END, NULL); +#endif + + rend = gtk_cell_renderer_pixbuf_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(gtkconv->infopane), rend, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(gtkconv->infopane), rend, "pixbuf", CONV_PROTOCOL_ICON_COLUMN, NULL); g_object_set(rend, "xalign", 0.0, "xpad", 3, "ypad", 0, NULL); -#if GTK_CHECK_VERSION(2, 6, 0) - g_object_set(rend, "ellipsize", PANGO_ELLIPSIZE_END, NULL); -#endif - rend = gtk_cell_renderer_pixbuf_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(gtkconv->infopane), rend, FALSE); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(gtkconv->infopane), rend, "pixbuf", CONV_EMBLEM_COLUMN, NULL);
--- a/pidgin/pidgin.h Mon Aug 27 22:20:13 2007 +0000 +++ b/pidgin/pidgin.h Mon Aug 27 22:45:15 2007 +0000 @@ -26,7 +26,7 @@ #ifndef _PIDGIN_H_ #define _PIDGIN_H_ -#ifndef _WIN32 +#ifdef GDK_WINDOWING_X11 # include <gdk/gdkx.h> #endif
--- a/pidgin/plugins/Makefile.am Mon Aug 27 22:20:13 2007 +0000 +++ b/pidgin/plugins/Makefile.am Mon Aug 27 22:45:15 2007 +0000 @@ -16,9 +16,13 @@ PERL_DIR = perl endif +if ENABLE_GESTURES +GESTURE_DIR = gestures +endif + SUBDIRS = \ $(CAP_DIR) \ - gestures \ + $(GESTURE_DIR) \ $(GEVOLUTION_DIR) \ $(MUSICMESSAGING_DIR) \ $(PERL_DIR) \