[x264-devel] commit: Correct X header path usage in configure (Brad Smith )
git at videolan.org
git at videolan.org
Mon Aug 16 12:07:13 CEST 2010
x264 | branch: master | Brad Smith <brad at comstyle.com> | Sun Aug 8 18:13:32 2010 -0400| [d0c41733a5b9f221011866c2a9ca46a6112241bf] | committer: Jason Garrett-Glaser
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.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=d0c41733a5b9f221011866c2a9ca46a6112241bf
---
configure | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/configure b/configure
index e0b92f9..9740522 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
More information about the x264-devel
mailing list