diff --git a/configure.in b/configure.in index 448a03cda7..cdf7d950c3 100644 --- a/configure.in +++ b/configure.in @@ -1724,19 +1724,6 @@ case "${host}" in ;; esac -if test "$wxUSE_GUI" = "yes"; then - if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_PM" != 1; then - dnl defines HAVE_X11_XKBLIB_H - AC_CHECK_HEADERS(X11/Xlib.h) - AC_CHECK_HEADERS([X11/XKBlib.h], [], [], - [ - #if HAVE_X11_XLIB_H - #include - #endif - ]) - fi -fi - dnl --------------------------------------------------------------------------- dnl Checks for compiler characteristics dnl --------------------------------------------------------------------------- @@ -3377,6 +3364,20 @@ dnl --------------------------------------------------------------------------- dnl Optional libraries included when system library is not used dnl --------------------------------------------------------------------------- +dnl do this after test for X11 above so that we have a chance of finding Xlib.h +if test "$wxUSE_GUI" = "yes"; then + if test "$wxUSE_UNIX" = "yes" -a "$wxUSE_PM" != 1; then + dnl defines HAVE_X11_XKBLIB_H + AC_CHECK_HEADERS(X11/Xlib.h) + AC_CHECK_HEADERS([X11/XKBlib.h], [], [], + [ + #if HAVE_X11_XLIB_H + #include + #endif + ]) + fi +fi + dnl ---------------------------------------------------------------- dnl iODBC support