From d0c41733a5b9f221011866c2a9ca46a6112241bf Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 8 Aug 2010 18:13:32 -0400 Subject: [PATCH] Correct X header path usage in configure Don't unconditionally set the header path for OpenBSD but do so if the --enable-visualize flag is specified. --- configure | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/configure b/configure index e0b92f9e..97405226 100755 --- a/configure +++ b/configure @@ -293,7 +293,6 @@ case $host_os in ;; openbsd*) SYS="OPENBSD" - CFLAGS="$CFLAGS -I/usr/X11R6/include" LDFLAGS="$LDFLAGS -lm" ;; *linux*) @@ -531,11 +530,16 @@ if cc_check "math.h" "-Werror" "return log2f(2);" ; then define HAVE_LOG2F fi -if [ "$vis" = "yes" ] && cc_check "X11/Xlib.h" "-L/usr/X11R6/lib -lX11" "XOpenDisplay( 0 );" ; then - LDFLAGS="-L/usr/X11R6/lib -lX11 $LDFLAGS" - define HAVE_VISUALIZE -else - vis="no" +if [ "$vis" = "yes" ] ; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -I/usr/X11R6/include" + if cc_check "X11/Xlib.h" "-L/usr/X11R6/lib -lX11" "XOpenDisplay(0);" ; then + LDFLAGS="-L/usr/X11R6/lib -lX11 $LDFLAGS" + define HAVE_VISUALIZE + else + vis="no" + CFLAGS="$save_CFLAGS" + fi fi if [ "$swscale" = "auto" ] ; then -- 2.47.3