what is the right way to check for X extensions with autoconf 2.54? Right now, we use AC_PATH_XTRA dnl Look for Xpm AC_CACHE_CHECK(for Xpm library, gb_cv_have_xpm, [ gb_LIBS_save=$LIBS gb_CFLAGS_save=$CFLAGS LIBS="$X_LIBS -lXpm $X_PRE_LIBS -lX11 $LIBS" CFLAGS="$CFLAGS $X_CFLAGS" AC_TRY_LINK([#include <X11/xpm.h>], [XpmReadFileToPixmap(0,0,0,0,0,0);], gb_cv_have_xpm=yes, gb_cv_have_xpm=no) LIBS=$gb_LIBS_save CFLAGS=$gb_CFLAGS_save]) dnl Same thing with XShape AC_CACHE_CHECK(for X shape extension, gb_cv_have_xshape, [ gb_LIBS_save=$LIBS gb_CFLAGS_save=$CFLAGS LIBS="$X_LIBS -lXext $X_PRE_LIBS -lX11 $LIBS" CFLAGS="$CFLAGS $X_CFLAGS" AC_TRY_LINK([#include <X11/Xlib.h> #include <X11/Xutil.h> #include <X11/extensions/shape.h>], [XShapeQueryExtension(0,0,0);], gb_cv_have_xshape=yes, gb_cv_have_xshape=no) LIBS=$gb_LIBS_save CFLAGS=$gb_CFLAGS_save]) Is there an equivalent standard idiom? AC_SEARCH_LIBS comes to mind, of course, but it does not permit additional #includes... Or maye they are not necessary at all? Thanks! -- Sam Steingold (http://www.podval.org/~sds) running w2k <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.honestreporting.com> There are 10 kinds of people: those who count in binary and those who do not.