diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-02-25 11:31:29 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-02-25 12:01:33 +0000 |
commit | be5e2b23c93b3d93d8d02f3870618c29f3737239 (patch) | |
tree | 519a4a7a75df5b129e4025b37a7b478c9f9edb2f /configure.ac | |
parent | 20d2f1702fc602d70fc2ed7a016289679106098e (diff) | |
parent | f04e52a2e5402a2bd17a5e923402df8e79dfd940 (diff) | |
download | dbus-be5e2b23c93b3d93d8d02f3870618c29f3737239.tar.gz |
Merge branch 'require-display-for-autolaunch-19997' into dbus-1.4
Reviewed-by: Colin Walters <walters@verbum.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 52 |
1 files changed, 33 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac index 42ec552b..3a5bc45d 100644 --- a/configure.ac +++ b/configure.ac @@ -1062,34 +1062,48 @@ AC_SUBST(DBUS_TEST_CFLAGS) AC_SUBST(DBUS_TEST_LIBS) ### X11 detection -if test x$dbus_win = xyes ; then - enable_x11=no -else -AC_PATH_XTRA +DBUS_X_LIBS= +DBUS_X_CFLAGS= + +AC_ARG_ENABLE([x11-autolaunch], + AS_HELP_STRING([--enable-x11-autolaunch], [build with X11 auto-launch support]), + [], [enable_x11_autolaunch=auto]) + +if test "x$dbus_win" = xyes; then + if test "x$enable_x11_autolaunch" = xyes; then + AC_MSG_ERROR([X11 auto-launch is not supported on Windows]) + fi -## for now enable_x11 just tracks have_x11, -## there's no --enable-x11 -if test x$no_x = xyes ; then - have_x11=no - enable_x11=no + enable_x11_autolaunch=no +fi + +if test "x$enable_x11_autolaunch" = xno; then + have_x11=no else - have_x11=yes - enable_x11=yes + AC_PATH_XTRA + + if test "x$no_x" = xyes; then + have_x11=no + else + have_x11=yes + DBUS_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" + DBUS_X_CFLAGS="$X_CFLAGS" + fi fi -if test x$enable_x11 = xyes ; then - AC_DEFINE(DBUS_BUILD_X11,1,[Build X11-dependent code]) - DBUS_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" - DBUS_X_CFLAGS="$X_CFLAGS" +if test "x$enable_x11_autolaunch,$have_x11" = xyes,no; then + AC_MSG_ERROR([X11 auto-launch requires X headers/libraries]) else - DBUS_X_LIBS= - DBUS_X_CFLAGS= + # move from "auto" to "yes" or "no" if necessary + enable_x11_autolaunch="$have_x11" fi -AC_SUBST(DBUS_X_CFLAGS) -AC_SUBST(DBUS_X_LIBS) +if test "x$enable_x11_autolaunch" = xyes ; then + AC_DEFINE([DBUS_BUILD_X11], [1], [Define to enable X11 auto-launch]) fi +AC_SUBST([DBUS_X_CFLAGS]) +AC_SUBST([DBUS_X_LIBS]) #### gcc warning flags |