X-Git-Url: https://ruderich.org/simon/gitweb/?p=wall-notify%2Fwall-notify.git;a=blobdiff_plain;f=configure.ac;h=528f7146ba45d116615fb97d6b4601a8f409a490;hp=582be6dab0cbb0284315883df70a9d255ab7a3ae;hb=1eb18876bb0eb8f55567dd8a92ab10091d045df7;hpb=d9e9fb8ccfa208052b89aee8cfd3fc6c38752b96 diff --git a/configure.ac b/configure.ac index 582be6d..528f714 100644 --- a/configure.ac +++ b/configure.ac @@ -54,6 +54,28 @@ AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_SSIZE_T +disable_x11_support= +AC_ARG_ENABLE([x11], + [AS_HELP_STRING([--disable-x11], [disable x11 support])], + [if test "x$enableval" = xno; then + disable_x11_support=yes + AC_DEFINE([DONT_USE_X11], 1, [Define to not use X11.]) + fi]) + +if test -z "$disable_x11_support"; then + AX_PTHREAD([],[AC_MSG_ERROR([pthread is required, use --disable-x11])]) + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$PTHREAD_CFLAGS $CFLAGS" + CC="$PTHREAD_CC" + + AC_PATH_XTRA + if test x"$no_x" = xyes; then + AC_MSG_ERROR([X11 is required, use --disable-x11]) + fi + LIBS="$X_PRE_LIBS $X_EXTRA_LIBS $X_LIBS -lX11 $LIBS" + CFLAGS="$X_CFLAGS $CFLAGS" +fi + AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT