diff options
author | Matt Messier <mmessier@grapetv.org> | 2007-05-08 16:49:28 -0400 |
---|---|---|
committer | Matt Messier <mmessier@grapetv.org> | 2007-05-08 16:49:28 -0400 |
commit | aa57f140aa3cf28debfa82e2200198ecb6871cfa (patch) | |
tree | 8385a30c8f91302e8a841eb285ddbbe723961d06 | |
parent | ff308c044bab7e8b8b55f70853925ac44a2001ad (diff) | |
download | xine-lib-aa57f140aa3cf28debfa82e2200198ecb6871cfa.tar.gz xine-lib-aa57f140aa3cf28debfa82e2200198ecb6871cfa.tar.bz2 |
Minor cleanups for X11 checks. Mostly comment what's going on.
-rw-r--r-- | m4/x11.m4 | 28 |
1 files changed, 19 insertions, 9 deletions
@@ -3,14 +3,20 @@ dnl Checks for X11 dnl --------------------------------------------- AC_DEFUN([XINE_X11_SUPPORT], [ + dnl This is more than a little bit weird, but ... AC_PATH_EXTRA has an + dnl AC_ARG_WITH in it for x, so it'll be processed by the time that we + dnl get here. Check the result of that to see if X support is enabled + dnl or disabled from the command-line. If it's enabled, do a package + dnl check for X libraries first. If that fails, do the normal autoconf + dnl AC_PATH_XTRA check and other stuff. if test "x$with_x" != "xno"; then - PKG_CHECK_MODULES([X], [x11 xext], , [ + PKG_CHECK_MODULES([X], [x11 xext], [], [ AC_PATH_XTRA dnl Set xv_path if its not done already dnl we do it here before rewriting X_LIBS - if test x$xv_path = x; then - xv_path=`echo $X_LIBS | sed -e 's/\-L\(.*\)/\1/'` + if test x"$xv_path" = x""; then + xv_path="`echo $X_LIBS | sed -e 's/\-L\(.*\)/\1/'`" fi dnl ---------------------------------------------- @@ -20,10 +26,10 @@ AC_DEFUN([XINE_X11_SUPPORT], [ if test "x$no_x" != "xyes"; then ac_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" - AC_CHECK_HEADERS([X11/extensions/XShm.h], [true], - [AC_MSG_ERROR([XShm extension is required])]) - AC_CHECK_LIB([Xext], [main], [true], - [AC_MSG_ERROR([libXext is required])], [$X_LIBS]) + AC_CHECK_HEADERS([X11/extensions/XShm.h], [], + [AC_MSG_ERROR([XShm extension is required])]) + AC_CHECK_LIB([Xext], [main], [], + [AC_MSG_ERROR([libXext is required])], [$X_LIBS]) CPPFLAGS="$ac_save_CPPFLAGS" X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 -lXext" fi @@ -33,10 +39,14 @@ AC_DEFUN([XINE_X11_SUPPORT], [ fi if test "x$no_x" != "xyes"; then - AC_DEFINE(HAVE_X11,1,[Define this if you have X11R6 installed]) + AC_DEFINE([HAVE_X11], 1, [Define this if you have X11R6 installed]) fi - AM_CONDITIONAL(HAVE_X11, [test "x$no_x" != "xyes"]) + AM_CONDITIONAL([HAVE_X11], [test x"$no_x" != x"yes"]) + dnl TODO: Take X_CFLAGS and split it into X_CFLAGS and X_CPPFLAGS + dnl -D, -I, and -U should all be in X_CPPFLAGS. Anything else should + dnl be in X_CFLAGS. For now, just leave X_CFLAGS alone and treat it + dnl as CFLAGS. dnl --------------------------------------------- dnl Locate libraries needed for X health check |