[x264-devel] [PATCH] Correct X header path usage within the configure script.
Brad
brad at comstyle.com
Mon Aug 9 00:07:39 CEST 2010
Ok so this is based on the previous diff I had posted for OpenBSD
but also fixes the --enable-visualize to properly set the X header
path when trying to link test the library and pulling in the X11/Xlib.h
header.
diff --git a/configure b/configure
index 565eb98..24cf0f7 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,14 @@ 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
+ 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"
+ fi
fi
if [ "$swscale" = "auto" ] ; then
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the x264-devel
mailing list