diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2007-08-25 05:02:32 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2007-08-25 05:02:32 +0800 |
commit | ec543643c786553ff47ced0a871b4f31508cdb8d (patch) | |
tree | e7a1f4e368cdbb65c51a73a731351091d15fa30e /configure.in | |
parent | a7aac14395dc0ceba8540be6e3d4981d459f9515 (diff) | |
download | gsoc2013-evolution-ec543643c786553ff47ced0a871b4f31508cdb8d.tar gsoc2013-evolution-ec543643c786553ff47ced0a871b4f31508cdb8d.tar.gz gsoc2013-evolution-ec543643c786553ff47ced0a871b4f31508cdb8d.tar.bz2 gsoc2013-evolution-ec543643c786553ff47ced0a871b4f31508cdb8d.tar.lz gsoc2013-evolution-ec543643c786553ff47ced0a871b4f31508cdb8d.tar.xz gsoc2013-evolution-ec543643c786553ff47ced0a871b4f31508cdb8d.tar.zst gsoc2013-evolution-ec543643c786553ff47ced0a871b4f31508cdb8d.zip |
** Fixes bug #411619
2007-08-24 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #411619
* configure.in:
Add appropriate compiler and linker flags to e-util if GTK+
was built against X11.
* widgets/Makefile.am: Fix subdirectory order.
* widgets/e-timezone-dialog/Makefile.am: Remove WIN32_BOOTSTRAP_LIBS.
svn path=/trunk/; revision=34101
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 57 |
1 files changed, 56 insertions, 1 deletions
diff --git a/configure.in b/configure.in index d2669f79d8..73d9c157a2 100644 --- a/configure.in +++ b/configure.in @@ -1293,6 +1293,52 @@ case $CFLAGS in ;; esac + +dnl ************************** +dnl Check for X libs and -lX11 +dnl ************************** + +PKG_CHECK_MODULES(X, x11, :, [ +# pkg-config modules not found (only present since X11R7 aka Xorg); use +# old-style detection +AC_PATH_XTRA +# X found +if test x$no_x != xyes ; then + evolution_save_cflags="$CFLAGS" + evolution_save_libs="$LIBS" + CFLAGS="$X_CFLAGS" + LIBS="$X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS" + AC_CHECK_LIB(X11, XFree, :, AC_MSG_ERROR([libX11 not found])) + CFLAGS="$evolution_save_cflags" + LIBS="$evolution_save_libs" + X_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" +fi +]) + +dnl ************************* +dnl Check for the Gtk backend +dnl if it's X11, we -lX11 +dnl ************************* + +evolution_save_cflags="$CFLAGS" +# pull in the CFLAGS to locate gdkconfig.h +CFLAGS=`$PKG_CONFIG --cflags gtk+-2.0` +AC_COMPILE_IFELSE([ +#include <gdkconfig.h> + +int main(void) { +#ifndef GDK_WINDOWING_X11 +#error GDK_WINDOWING_X11 not defined +#endif + return 0; +} +], + GDK_BACKEND_X11=yes, + GDK_BACKEND_X11=no) + +CFLAGS="$evolution_save_cflags" + + AM_PATH_ORBIT2(2.9.8) AC_MSG_CHECKING(for CORBA include paths) @@ -1388,7 +1434,16 @@ EVO_SET_COMPILE_FLAGS(E_NAME, libgnomeui-2.0 libbonoboui-2.0) AC_SUBST(E_NAME_CFLAGS) AC_SUBST(E_NAME_LIBS) -EVO_SET_COMPILE_FLAGS(E_UTIL, libbonoboui-2.0 libglade-2.0 libgnomeui-2.0 libedataserver-$EDS_PACKAGE libedataserverui-$EDS_PACKAGE $mozilla_nspr $mono_package, $THREADS_CFLAGS $MANUAL_NSPR_CFLAGS, $THREADS_LIBS $MANUAL_NSPR_LIBS) +# If Gtk/Gdk is built against X11, e-util uses some +# X11-specific code so link with X11. +if test "x$GDK_BACKEND_X11" = "xyes"; then + E_UTIL_X11_CFLAGS="$X_CFLAGS" + E_UTIL_X11_LIBS="$X_LIBS" +else + E_UTIL_X11_CFLAGS="" + E_UTIL_X11_LIBS="" +fi +EVO_SET_COMPILE_FLAGS(E_UTIL, libbonoboui-2.0 libglade-2.0 libgnomeui-2.0 libedataserver-$EDS_PACKAGE libedataserverui-$EDS_PACKAGE $mozilla_nspr $mono_package, $THREADS_CFLAGS $MANUAL_NSPR_CFLAGS $E_UTIL_X11_CFLAGS, $THREADS_LIBS $MANUAL_NSPR_LIBS $E_UTIL_X11_LIBS) AC_SUBST(E_UTIL_CFLAGS) AC_SUBST(E_UTIL_LIBS) |