imlib2 configure.in patch

SVN revision: 13473
This commit is contained in:
Carsten Haitzler 2005-02-23 03:27:41 +00:00
parent 5d618bc603
commit 3c5e1e8bf0
1 changed files with 16 additions and 23 deletions

View File

@ -144,35 +144,28 @@ AC_ARG_WITH(freetype-config, [ --with-freetype-config=FREETYPE_CONFIG use fr
freetype_cflags=`$FREETYPE_CONFIG --cflags`
freetype_libs=`$FREETYPE_CONFIG --libs`
x11=no
AC_ARG_ENABLE(x11,[ --disable-x11 attempt to build with X11 support [default=yes]],
[
if test x$enableval = xyes; then
have_x=yes
else
have_x=no
fi
],
[
AC_CHECK_HEADER(X11/X.h,
[ have_x="yes" ],
[ have_x="no" ]
)
]
)
AC_MSG_CHECKING(whether X11 support is to be enabled)
AC_PATH_X([X], [X11/Xlib.h], [XOpenDisplay(NULL)])
if test "x$have_x" = "xno"; then
# If --without-x was passed, this will be "disabled" instead of "no" --
# so always treat "no" as an error
AC_MSG_ERROR(
[no X support found. Use --x-includes and --x-libraries to specify the X
path on your system, or --without-x to disable X support.])
fi
if test "x$have_x" = "xyes"; then
x_dir="/usr/X11R6";
x_cflags="-I"$x_dir"/include"
x_libs="-L"$x_dir"/lib -lX11 -lXext"
AC_MSG_RESULT(enabling X11 support)
if test "x$x_includes" != "x"; then
x_cflags="-I$x_includes"
fi
if test "x$x_libraries" != "x"; then
x_libs="-L$x_libraries -lX11 -lXext"
fi
AM_CONDITIONAL(BUILD_X11, true)
AC_DEFINE(BUILD_X11, 1, [enabling X11 support])
else
x_dir=""
x_cflags=""
x_libs=""
AC_MSG_RESULT(disabling X11 support)
AM_CONDITIONAL(BUILD_X11, false)
fi