Index: configure.in =================================================================== RCS file: /cvsroot/conky/conky/configure.in,v retrieving revision 1.12 diff -u -r1.12 configure.in --- configure.in 22 Aug 2005 01:05:39 -0000 1.12 +++ configure.in 22 Aug 2005 19:48:24 -0000 @@ -2,6 +2,7 @@ AM_INIT_AUTOMAKE(conky, 1.3) AM_CONFIG_HEADER(src/config.h) +AC_PROG_LIBTOOL AC_CONFIG_FILES( Makefile @@ -63,23 +64,6 @@ fi dnl -dnl DOUBLE_BUFFER option -dnl - -dah=yes -AC_ARG_ENABLE(double_buffer, -[ --enable-double-buffer enable if you want to support flicker-free operation [default=yes]], - [dah="$enableval"]) - -if test $dah != "no"; then - AC_DEFINE(DOUBLE_BUFFER, 1, [Define if you want support for the DBE extension]) - AC_CHECK_HEADERS([X11/extensions/Xdbe.h], [AC_DEFINE([HAVE_XDBE], 1, [Xdbe])], [XDBE_MISSING=yes]) - if test "x$XDBE_MISSING" = xyes; then - AC_MSG_ERROR([something went wrong when checking for Xdbe (double buffer extension]) - fi -fi - -dnl dnl PROC_UPTIME option dnl @@ -183,17 +167,22 @@ AM_CONDITIONAL(BUILD_X11, test x$want_x11 == xyes) if test x$want_x11 == xyes; then AC_PATH_X -AC_CHECK_HEADERS([X11/Xlib.h], [], [X11_MISSING=yes]) -AC_CHECK_LIB([X11], [XOpenDisplay], [X11_LIBS="-lX11"], [], [[-L$x_libraries]]) -AC_CHECK_LIB([Xext], [XdbeQueryExtension], [ - X11_LIBS="$X11_LIBS -lXext" - AC_DEFINE(HAVE_LIBXEXT, 1, [Define if you have libXext]) - ], [], [[-L$x_libraries $X11_LIBS]]) - if test "x$X11_MISSING" = xyes; then +AC_PATH_XTRA +CFLAGS="$CFLAGS $X_CFLAGS" +LIBS="$LIBS $X_LIBS" +LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS" +dnl AC_CHECK_HEADERS([X11/Xlib.h], [], [X11_MISSING=yes]) +dnl AC_CHECK_LIB([X11], [XOpenDisplay], [X11_LIBS="-lX11"], [], [[-L$x_libraries]]) +dnl AC_CHECK_LIB([Xext], [XdbeQueryExtension], [ +dnl X11_LIBS="$X11_LIBS -lXext" +dnl AC_DEFINE(HAVE_LIBXEXT, 1, [Define if you have libXext]) +dnl ], [], [[-L$x_libraries $X11_LIBS]]) + if test "x$X_DISPLAY_MISSING" = xyes; then AC_MSG_ERROR([something went wrong when checking for X11, you're probably missing headers or it's not installed, either re-run configure with --disable-x11, or fix this]) - fi + fi AC_DEFINE(X11, 1, [Define if you want to use X11]) AC_DEFINE(HAVE_X11, 1, [Define if you have X11]) + AM_CONDITIONAL(HAVE_X11, test x$want_x11) fi dnl AC_PATH_X if test $have_x != "yes"; then dnl echo "Sorry, X is very much needed" @@ -201,18 +190,37 @@ dnl fi dnl AC_DEFINE(HAVE_X11, 1, [Define if you have X11]) -AC_CHECK_LIB([X11], [XOpenDisplay], [X11_LIBS="-lX11"], [], [[-L$x_libraries]]) -AC_CHECK_LIB([Xext], [XdbeQueryExtension], [ - X11_LIBS="$X11_LIBS -lXext" - AC_DEFINE(HAVE_LIBXEXT, 1, [Define if you have libXext]) - ], [], [[-L$x_libraries $X11_LIBS]]) +dnl +dnl DOUBLE_BUFFER option +dnl -if test "$x_libraries" != ""; then - LDFLAGS="$LDFLAGS -L$x_libraries" -fi +dah=yes +AC_ARG_ENABLE(double_buffer, +[ --enable-double-buffer enable if you want to support flicker-free operation [default=yes]], + [dah="$enableval"]) + +if test $dah != "no"; then + AC_DEFINE(DOUBLE_BUFFER, 1, [Define if you want support for the DBE extension]) +dnl AC_CHECK_HEADERS([X11/extensions/Xdbe.h], [AC_DEFINE([HAVE_XDBE], 1, [Xdbe])], [XDBE_MISSING=yes]) +dnl if test "x$XDBE_MISSING" = xyes; then +dnl AC_MSG_ERROR([something went wrong when checking for Xdbe (double buffer extension]) +dnl AC_CHECK_HEADERS([X11/extensions/Xdbe.h],, +dnl [ +dnl AC_MSG_ERROR([something went wrong when checking for Xdbe (double buffer extension)]) +dnl ] +dnl ) +dnl fi +# AC_MSG_CHECKING([for X11/extensions/Xdbe.h]) + AC_CHECK_LIB(Xext, XdbeQueryExtension, + [ + AC_DEFINE([HAVE_XDBE], 1, [Xdbe]) + LIBS="$LIBS -lXext" + ], + [ + AC_MSG_ERROR([something went wrong when checking for Xdbe (double buffer extension)]) + ] + ) -if test "$x_includes" != ""; then - CFLAGS="$CFLAGS -Wall -I$x_includes" fi dnl