diff options
author | Owen Taylor <otaylor@src.gnome.org> | 1998-03-16 04:56:36 +0800 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 1998-03-16 04:56:36 +0800 |
commit | 40c9962c2e20dba309212f088db6962fcea4b99d (patch) | |
tree | 6298b75467edf1a17c4ea7e32028571ac56e3bee /macros/gnome-x-checks.m4 | |
parent | 03b1949546038ec91236cd81d9a2d3dc6669a4c6 (diff) | |
download | gsoc2013-evolution-40c9962c2e20dba309212f088db6962fcea4b99d.tar.gz gsoc2013-evolution-40c9962c2e20dba309212f088db6962fcea4b99d.tar.zst gsoc2013-evolution-40c9962c2e20dba309212f088db6962fcea4b99d.zip |
Updates to use AM_PATH_GTK. See various ChangeLogs for details.
svn path=/trunk/; revision=68
Diffstat (limited to 'macros/gnome-x-checks.m4')
-rw-r--r-- | macros/gnome-x-checks.m4 | 51 |
1 files changed, 14 insertions, 37 deletions
diff --git a/macros/gnome-x-checks.m4 b/macros/gnome-x-checks.m4 index d5df4ea384..9a2d6de71f 100644 --- a/macros/gnome-x-checks.m4 +++ b/macros/gnome-x-checks.m4 @@ -2,63 +2,47 @@ dnl GNOME_X_CHECKS dnl dnl Basic X11 related checks for X11. At the end, the following will be dnl defined/changed: -dnl x_{includes,libraries} From AC_PATH_X -dnl X_{CFLAGS,LIBS} From AC_PATH_XTRA -dnl X_{PRE,EXTRA}_LIBS - do - -dnl x_libs Essentially $X_PRE_LIBS -lX11 -Xext $X_EXTRA_LIBS +dnl GTK_{CFLAGS,LIBS} From AM_PATH_GTK dnl CPPFLAGS Will include $X_CFLAGS dnl GNOME_HAVE_SM `true' or `false' depending on whether session dnl management is available. It is available if dnl both -lSM and X11/SM/SMlib.h exist. (Some dnl Solaris boxes have the library but not the header) +dnl XPM_LIBS -lXpm if Xpm library is present, otherwise "" dnl dnl The following configure cache variables are defined (but not used): dnl gnome_cv_passdown_{x_libs,X_LIBS,X_CFLAGS} dnl AC_DEFUN([GNOME_X_CHECKS], [ - AC_PATH_X - AC_PATH_XTRA + AM_PATH_GTK(,,AC_MSG_ERROR(GTK not installed, or gtk-config not in path)) - saved_ldflags="$LDFLAGS" - LDFLAGS="$X_LDFLAGS $X_LIBS" - - dnl Hope that X_CFLAGS have only -I and -D. Otherwise, we could + dnl Hope that GTK_CFLAGS have only -I and -D. Otherwise, we could dnl test -z "$x_includes" || CPPFLAGS="$CPPFLAGS -I$x_includes" dnl dnl Use CPPFLAGS instead of CFLAGS because AC_CHECK_HEADERS uses dnl CPPFLAGS, not CFLAGS - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - - dnl Checks for libraries. - AC_CHECK_LIB(X11, XOpenDisplay, - x_libs="$X_PRE_LIBS -lX11", - [AC_MSG_ERROR(No X11 installed)], - $X_EXTRA_LIBS) - AC_SUBST(x_libs) - - LDFLAGS="$saved_ldflags $X_LDFLAGS $X_LIBS $x_libs" + CPPFLAGS="$CPPFLAGS $GTK_CFLAGS" - AC_CHECK_LIB(Xext, XShmAttach, - x_libs="$x_libs -lXext", , - $x_libs $X_EXTRA_LIBS) + saved_ldflags="$LDFLAGS" + LDFLAGS="$LDFLAGS $GTK_LIBS" - x_libs="$x_libs $X_EXTRA_LIBS" - gnome_cv_passdown_x_libs="$x_libs" - gnome_cv_passdown_X_LIBS="$X_LIBS" - gnome_cv_passdown_X_CFLAGS="$X_CFLAGS" + gnome_cv_passdown_x_libs="$GTK_LIBS" + gnome_cv_passdown_X_LIBS="$GTK_LIBS" + gnome_cv_passdown_X_CFLAGS="$GTK_CFLAGS" + gnome_cv_passdown_GTK_LIBS="$GTK_LIBS" - LDFLAGS="$saved_ldflags $X_LDFLAGS $X_LIBS" + LDFLAGS="$saved_ldflags $GTK_LIBS" GNOME_HAVE_SM=true - case "$x_libs" in + case "$GTK_LIBS" in *-lSM*) dnl Already found it. ;; *) dnl Assume that if we have -lSM then we also have -lICE. AC_CHECK_LIB(SM, SmcSaveYourselfDone, - [x_libs="$x_libs -lSM -lICE"],GNOME_HAVE_SM=false, + [GTK_LIBS="-lSM -lICE $GTK_LIBS"],GNOME_HAVE_SM=false, $x_libs -lICE) ;; esac @@ -71,13 +55,6 @@ AC_DEFUN([GNOME_X_CHECKS], AC_DEFINE(HAVE_LIBSM) fi - AC_CHECK_LIB(gtk, gdk_pixmap_unref, - GTK_LIBS="-lgtk -lgdk -lglib -lm", - [AC_MSG_ERROR(Can not find a Gtk 0.99.1, probably you have an older version?)], - -lgdk -lglib $x_libs -lm) - AC_SUBST(GTK_LIBS) - - gnome_cv_passdown_GTK_LIBS="$GTK_LIBS" XPM_LIBS="" AC_CHECK_LIB(Xpm, XpmFreeXpmImage, [XPM_LIBS="-lXpm"], , $x_libs) |