[PATCH] Corrrect X header path usage within the configure script. Don't unconditionally set the header path for OpenBSD but do so if the --enable-visualize flag is specified.
Brad Smith
brad at comstyle.com
Mon Aug 9 00:13:32 CEST 2010
---
configure | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index 565eb98..152ca45 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
--
1.7.1
--ibTvN161/egqYuK8--
More information about the x264-devel
mailing list