From 6947b8c6d7af1cdaa629f3f53a16dec02b71533b Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Thu, 17 Mar 2022 16:23:56 +0900 Subject: [PATCH] scripts/configure: enable building without x --- scripts/configure | 8 +++++--- scripts/configure.in | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/configure b/scripts/configure index 4e92ddba..65e4624d 100755 --- a/scripts/configure +++ b/scripts/configure @@ -6058,10 +6058,10 @@ fi fi -if test "x${X_DISPLAY_MISSING}" = "x"; then +if test "x$no_x" = "x"; then usingX11=1 else - as_fn_error $? "Unable to find X11---compiling without graphics" "$LINENO" 5 + echo Unable to find X11---compiling without graphics. echo Cannot find X11---will attempt to compile anyway. echo Graphics options will be NULL only! if test $usingOGL ; then @@ -7282,7 +7282,9 @@ if test "x$enable_threads" = "xyes" ; then $as_echo "#define HAVE_PTHREADS 1" >>confdefs.h gr_libs="$gr_libs -lpthread" - gr_srcs="$gr_srcs \${X11THREAD_SRCS}" + if test $usingX11 ; then + gr_srcs="$gr_srcs \${X11THREAD_SRCS}" + fi gr_hsrcs="" gr_hprog="" fi diff --git a/scripts/configure.in b/scripts/configure.in index c9d16277..79b4cd80 100644 --- a/scripts/configure.in +++ b/scripts/configure.in @@ -315,10 +315,10 @@ dnl Check for X enabled/disabled AC_PATH_XTRA -if test "x${X_DISPLAY_MISSING}" = "x"; then +if test "x$no_x" = "x"; then usingX11=1 else - AC_MSG_ERROR([Unable to find X11---compiling without graphics]) + echo Unable to find X11---compiling without graphics. echo Cannot find X11---will attempt to compile anyway. echo Graphics options will be NULL only! if test $usingOGL ; then