2005-05-13 22:53:36 +00:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
|
|
|
|
|
AC_PREREQ(2.57)
|
|
|
|
|
AC_INIT([libX11],
|
2009-02-17 16:09:41 +01:00
|
|
|
1.2,
|
2005-07-29 21:22:50 +00:00
|
|
|
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
|
2005-05-13 22:53:36 +00:00
|
|
|
libX11)
|
|
|
|
|
AC_CONFIG_SRCDIR([Makefile.am])
|
2006-06-22 23:47:38 -07:00
|
|
|
AM_INIT_AUTOMAKE([dist-bzip2 foreign])
|
2005-05-13 22:53:36 +00:00
|
|
|
|
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
|
|
|
|
|
AM_CONFIG_HEADER([src/config.h])
|
2005-07-08 06:57:06 +00:00
|
|
|
AC_CONFIG_HEADER([include/X11/XlibConf.h])
|
2005-05-13 22:53:36 +00:00
|
|
|
|
2009-01-28 20:31:42 -02:00
|
|
|
# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG, XORG_WITH_LINT
|
|
|
|
|
m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
|
|
|
|
|
XORG_MACROS_VERSION(1.2)
|
2008-02-15 17:27:53 -08:00
|
|
|
|
2005-05-13 22:53:36 +00:00
|
|
|
# Checks for programs.
|
|
|
|
|
AC_PROG_LIBTOOL
|
2008-10-11 01:03:14 -04:00
|
|
|
DOLT
|
2005-05-13 22:53:36 +00:00
|
|
|
AC_PROG_CC
|
2009-01-28 20:31:42 -02:00
|
|
|
XORG_CWARNFLAGS
|
2005-08-15 19:53:37 +00:00
|
|
|
|
2008-09-23 19:02:02 +03:00
|
|
|
if test x"$CC_FOR_BUILD" = x; then
|
|
|
|
|
if test x"$cross_compiling" = xyes; then
|
|
|
|
|
AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc)
|
|
|
|
|
else
|
|
|
|
|
CC_FOR_BUILD="$CC"
|
|
|
|
|
fi
|
2008-09-23 17:30:13 +03:00
|
|
|
fi
|
2008-09-23 19:02:02 +03:00
|
|
|
AC_SUBST([CC_FOR_BUILD])
|
2008-09-23 17:30:13 +03:00
|
|
|
|
2005-08-15 19:53:37 +00:00
|
|
|
XORG_PROG_RAWCPP
|
2005-05-13 22:53:36 +00:00
|
|
|
|
2006-10-06 12:36:39 -07:00
|
|
|
# Build with XCB support?
|
2006-02-19 11:49:15 -08:00
|
|
|
AC_ARG_WITH(xcb,
|
|
|
|
|
AC_HELP_STRING([--with-xcb], [use XCB for low-level protocol implementation]),
|
|
|
|
|
[ac_cv_use_xcb=$withval], [ac_cv_use_xcb=yes])
|
|
|
|
|
AC_CACHE_CHECK([whether to use XCB], [ac_cv_use_xcb], [ac_cv_use_xcb=yes])
|
|
|
|
|
AM_CONDITIONAL(XCB, test x$ac_cv_use_xcb != xno)
|
|
|
|
|
|
2005-05-13 22:53:36 +00:00
|
|
|
# Checks for pkg-config packages
|
2008-05-28 17:31:59 +09:30
|
|
|
PKG_CHECK_MODULES(XPROTO, [xproto >= 7.0.13])
|
2005-05-17 22:32:09 +00:00
|
|
|
AC_SUBST(XPROTO_CFLAGS)
|
|
|
|
|
|
2006-02-19 11:49:15 -08:00
|
|
|
case "$ac_cv_use_xcb" in
|
|
|
|
|
no)
|
|
|
|
|
X11_REQUIRES="xau xcmiscproto bigreqsproto"
|
|
|
|
|
PKG_CHECK_MODULES(XDMCP, xdmcp)
|
|
|
|
|
AC_CHECK_LIB(Xdmcp, XdmcpWrap, [xdmauth="yes"], [xdmauth="no"], [$XDMCP_LIBS])
|
|
|
|
|
AC_DEFINE(USE_XCB, 0, [Use XCB for low-level protocol implementation])
|
|
|
|
|
;;
|
|
|
|
|
*)
|
Use XCB's new socket handoff mechanism rather than the old XCB Xlib lock.
Previously, Xlib/XCB used XCB's Xlib lock to prevent XCB from sending
requests between calls to Xlib's LockDisplay and UnlockDisplay macros.
Xlib/XCB then sent all of its requests using XCB's xcb_send_request, and
had to flush its requests when unlocking the display.
XCB 1.2 adds a new socket handoff mechanism, xcb_take_socket. Replace
much of the existing Xlib/XCB implementation with the use of
xcb_take_socket to take ownership of the write side of the X connection
socket, and a return_socket callback which writes any outstanding requests
with xcb_writev. This approach allows Xlib/XCB to use the same buffering
as traditional Xlib did. In particular, programs which use Xlib/XCB and
never make XCB calls will never need to hand the socket back to XCB, and
vice versa.
This allows us to discard large quantities of synchronization code from
Xlib/XCB, together with the synchronization bugs present in that code.
Several test cases which previously failed now work perfectly, including
multi-threaded ico. In addition, the infamous locking correctness
assertions, triggered when double-locking or when unlocking without a
previous lock, no longer exist, because Xlib/XCB no longer has any reason
to care more about application locking than traditional Xlib does.
Furthermore, the handoff approach provides great improvements to
performance. Results from x11perf's XNoOp test, which represented the
worst case for the lock-based Xlib/XCB:
Traditional Xlib: average 19100000/sec
Lock-based Xlib/XCB: average 3350000/sec
Handoff-based Xlib/XCB: average 17400000/sec
Thus, for no-ops, the handoff mechanism provides more than a 4x speedup to
Xlib/XCB, bringing Xlib/XCB within 9% of traditional Xlib no-op
performance. Of course, real-world workloads do not use no-op, so your
mileage may vary. In particular, since no-ops represent the worst case,
we expect real workloads to more closely match the performance of
traditional Xlib.
While removing synchronization code, we changed _XReply to not drop any
locks when calling xcb_wait_for_reply; previously, we had to carefully
avoid a deadlock between the Display lock and the XCB Xlib lock. Holding
the locks reduces implementation complexity and should not impact
applications.
Commit by Jamey Sharp and Josh Triplett.
XCB's handoff mechanism inspired by Keith Packard.
2008-03-15 17:22:23 -07:00
|
|
|
X11_REQUIRES="xcb >= 1.1.92"
|
|
|
|
|
X11_EXTRA_DEPS="xcb >= 1.1.92"
|
2006-02-19 11:49:15 -08:00
|
|
|
xdmauth="no" # XCB handles all auth
|
|
|
|
|
AC_DEFINE(USE_XCB, 1, [Use XCB for low-level protocol implementation])
|
|
|
|
|
;;
|
|
|
|
|
esac
|
2006-11-07 09:32:00 -08:00
|
|
|
AC_SUBST(X11_EXTRA_DEPS)
|
2006-02-19 11:49:15 -08:00
|
|
|
PKG_CHECK_MODULES(X11, xextproto xtrans $X11_REQUIRES)
|
2005-05-13 22:53:36 +00:00
|
|
|
|
2005-09-02 23:00:30 +00:00
|
|
|
dnl Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro
|
|
|
|
|
dnl was not expanded, since libX11 with no transport types is rather useless.
|
|
|
|
|
dnl
|
|
|
|
|
dnl If you're seeing an error here, be sure you installed the lib/xtrans module
|
|
|
|
|
dnl first and if it's not in the default location, that you set the ACLOCAL
|
|
|
|
|
dnl environment variable to find it, such as:
|
|
|
|
|
dnl ACLOCAL="aclocal -I ${PREFIX}/share/aclocal"
|
|
|
|
|
m4_pattern_forbid(XTRANS_CONNECTION_FLAGS)
|
|
|
|
|
|
2005-05-21 23:07:48 +00:00
|
|
|
# Transport selection macro from xtrans.m4
|
|
|
|
|
XTRANS_CONNECTION_FLAGS
|
2005-05-13 22:53:36 +00:00
|
|
|
|
2005-06-18 07:48:43 +00:00
|
|
|
# Secure RPC detection macro from xtrans.m4
|
|
|
|
|
XTRANS_SECURE_RPC_FLAGS
|
2005-06-04 22:53:21 +00:00
|
|
|
|
2008-06-18 20:00:25 -07:00
|
|
|
# Preferred order to try transports for local connections
|
|
|
|
|
AC_MSG_CHECKING([what order to try transports in for local connections])
|
|
|
|
|
case $host_os in
|
|
|
|
|
solaris*)
|
|
|
|
|
# On Solaris 2.6 through 9, named pipes (LOCAL_TRANS) were
|
|
|
|
|
# faster than Unix domain sockets, but on Solaris 10 & later,
|
|
|
|
|
# Unix domain sockets are faster now.
|
|
|
|
|
DEFAULT_LOCAL_TRANS="UNIX_TRANS,LOCAL_TRANS,TCP_TRANS"
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
if test "$LOCALCONN" = "yes"; then
|
|
|
|
|
DEFAULT_LOCAL_TRANS="LOCAL_TRANS,UNIX_TRANS,TCP_TRANS"
|
|
|
|
|
else
|
|
|
|
|
DEFAULT_LOCAL_TRANS="UNIX_TRANS,TCP_TRANS"
|
|
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
AC_ARG_WITH(local-transport-order,
|
|
|
|
|
AC_HELP_STRING([--with-local-transport-order=LIST], [preference sorted list of transport types to try for local connections]),
|
|
|
|
|
[LOCAL_TRANSPORT_LIST=$withval],
|
|
|
|
|
[LOCAL_TRANSPORT_LIST=$DEFAULT_LOCAL_TRANS])
|
|
|
|
|
AC_DEFINE_UNQUOTED([LOCAL_TRANSPORT_LIST], [$LOCAL_TRANSPORT_LIST],
|
|
|
|
|
[preference sorted list of transport types to try for local connections])
|
|
|
|
|
AC_MSG_RESULT([$LOCAL_TRANSPORT_LIST])
|
|
|
|
|
|
2005-05-13 22:53:36 +00:00
|
|
|
# Check for dlopen
|
2005-07-11 08:29:18 +00:00
|
|
|
AC_MSG_CHECKING([if run-time linking is supported])
|
2005-05-13 22:53:36 +00:00
|
|
|
AC_SEARCH_LIBS(dlopen,[dl svld])
|
2005-05-21 04:26:12 +00:00
|
|
|
if test "x$ac_cv_search_dlopen" = xno; then
|
2005-05-13 22:53:36 +00:00
|
|
|
AC_SEARCH_LIBS(shl_load,[dld])
|
2005-05-21 04:26:12 +00:00
|
|
|
if test "x$ac_cv_search_shl_load" != xno; then
|
2005-05-13 22:53:36 +00:00
|
|
|
AC_DEFINE(HAVE_SHL_LOAD,1,
|
|
|
|
|
[Use shl_load to load shared libraries])
|
|
|
|
|
AC_CHECK_HEADERS([dl.h])
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
AC_DEFINE(HAVE_DLOPEN,1,[Use dlopen to load shared libraries])
|
|
|
|
|
AC_CHECK_HEADERS([dlfcn.h])
|
|
|
|
|
fi
|
|
|
|
|
if test x$ac_cv_header_dlcfn_h -o x$ac_cv_header_dl_h; then
|
2005-07-11 08:29:18 +00:00
|
|
|
HAVE_LOADABLE_MODULES=yes
|
|
|
|
|
else
|
|
|
|
|
HAVE_LOADABLE_MODULES=no
|
|
|
|
|
fi
|
|
|
|
|
AC_MSG_RESULT($HAVE_LOADABLE_MODULES)
|
|
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([if loadable i18n module support should be enabled])
|
|
|
|
|
AC_ARG_ENABLE(loadable-i18n,
|
2005-07-29 21:22:50 +00:00
|
|
|
AC_HELP_STRING([--enable-loadable-i18n],
|
2005-07-11 08:29:18 +00:00
|
|
|
[Controls loadable i18n module support]),
|
|
|
|
|
[XLIB_LOADABLE_I18N=$enableval],
|
2005-07-29 21:22:50 +00:00
|
|
|
[XLIB_LOADABLE_I18N="no"])
|
2005-07-11 08:29:18 +00:00
|
|
|
if test x$XLIB_LOADABLE_I18N = xyes; then
|
2005-07-29 21:22:50 +00:00
|
|
|
if test x$HAVE_LOADABLE_MODULES = xno; then
|
|
|
|
|
AC_MSG_ERROR([Loadable module support is required to enable loadable i18n module support])
|
|
|
|
|
fi
|
2005-07-11 08:29:18 +00:00
|
|
|
AC_DEFINE(USE_DYNAMIC_LC,1,
|
|
|
|
|
[Split some i18n functions into loadable modules])
|
2005-07-15 04:08:51 +00:00
|
|
|
AC_SUBST(I18N_MODULE_LIBS,'${top_builddir}/src/libX11.la')
|
2005-07-11 08:29:18 +00:00
|
|
|
fi
|
|
|
|
|
AC_MSG_RESULT($XLIB_LOADABLE_I18N)
|
2008-06-17 14:41:17 -07:00
|
|
|
|
2005-07-11 08:29:18 +00:00
|
|
|
AM_CONDITIONAL(XLIB_LOADABLE_I18N, test x$XLIB_LOADABLE_I18N = xyes)
|
|
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([if loadable Xcursor library support should be enabled])
|
|
|
|
|
AC_ARG_ENABLE(loadable-xcursor,
|
|
|
|
|
AC_HELP_STRING([--disable-loadable-xcursor],
|
|
|
|
|
[Controls loadable xcursor library support]),
|
|
|
|
|
[XLIB_LOADABLE_XCURSOR=$enableval],
|
|
|
|
|
[XLIB_LOADABLE_XCURSOR=$HAVE_LOADABLE_MODULES])
|
|
|
|
|
if test x$XLIB_LOADABLE_XCURSOR = xyes; then
|
2005-05-13 22:53:36 +00:00
|
|
|
AC_DEFINE(USE_DYNAMIC_XCURSOR,1,
|
|
|
|
|
[Use the X cursor library to load cursors])
|
|
|
|
|
fi
|
2005-07-11 08:29:18 +00:00
|
|
|
AC_MSG_RESULT($XLIB_LOADABLE_XCURSOR)
|
2008-06-17 14:41:17 -07:00
|
|
|
|
2005-05-13 22:53:36 +00:00
|
|
|
# Checks for header files.
|
|
|
|
|
AC_HEADER_STDC
|
|
|
|
|
dnl AC_CHECK_HEADERS([stdio.h stdlib.h math.h])
|
|
|
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
|
AC_CHECK_FUNCS([strtol])
|
2005-06-05 03:29:33 +00:00
|
|
|
# Used in lcFile.c (see also --enable-xlocaledir settings below)
|
|
|
|
|
XLOCALEDIR_IS_SAFE="no"
|
|
|
|
|
AC_CHECK_FUNC([issetugid], [XLOCALEDIR_IS_SAFE="yes"]
|
|
|
|
|
AC_DEFINE(HASSETUGID,1,[Has issetugid() function]))
|
|
|
|
|
AC_CHECK_FUNC([getresuid], [XLOCALEDIR_IS_SAFE="yes"]
|
|
|
|
|
AC_DEFINE(HASGETRESUID,1,[Has getresuid() & getresgid() functions]))
|
|
|
|
|
# Used in Font.c
|
|
|
|
|
AC_CHECK_FUNC([shmat], AC_DEFINE(HAS_SHM,1,[Has shm*() functions]))
|
2005-05-13 22:53:36 +00:00
|
|
|
|
|
|
|
|
# Checks for system services
|
|
|
|
|
dnl AC_PATH_XTRA
|
|
|
|
|
|
|
|
|
|
# arch specific things
|
2005-07-09 18:44:14 +00:00
|
|
|
WCHAR32="1"
|
2005-05-13 22:53:36 +00:00
|
|
|
case $target_alias in
|
2005-07-09 18:44:14 +00:00
|
|
|
*os2*) os2="true" ; WCHAR32="0" ;;
|
2005-05-13 22:53:36 +00:00
|
|
|
*) ;;
|
|
|
|
|
esac
|
2005-07-09 18:44:14 +00:00
|
|
|
AC_SUBST(WCHAR32)
|
2005-05-13 22:53:36 +00:00
|
|
|
|
|
|
|
|
AM_CONDITIONAL(OS2, test x$os2 = xtrue)
|
|
|
|
|
|
2007-12-10 23:00:44 -08:00
|
|
|
AC_ARG_WITH(launchd, AS_HELP_STRING([--with-launchd], [Build with support for Apple's launchd (default: auto)]), [LAUNCHD=$withval], [LAUNCHD=auto])
|
|
|
|
|
if test "x$LAUNCHD" = xauto; then
|
|
|
|
|
unset LAUNCHD
|
|
|
|
|
AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no])
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if test "x$LAUNCHD" = xyes ; then
|
|
|
|
|
AC_DEFINE(HAVE_LAUNCHD, 1, [launchd support available])
|
|
|
|
|
AC_DEFINE(TRANS_REOPEN, 1, [launchd support available])
|
|
|
|
|
fi
|
|
|
|
|
|
2005-05-13 22:53:36 +00:00
|
|
|
AC_ARG_ENABLE(xthreads,
|
|
|
|
|
AC_HELP_STRING([--disable-xthreads],
|
|
|
|
|
[Disable Xlib support for Multithreading]),
|
|
|
|
|
[xthreads=$enableval],[xthreads=yes])
|
|
|
|
|
|
2005-08-21 15:38:39 +00:00
|
|
|
AC_CHECK_LIB(c, getpwuid_r, [mtsafeapi="yes"], [mtsafeapi="no"])
|
|
|
|
|
|
2005-05-13 22:53:36 +00:00
|
|
|
case x$xthreads in
|
|
|
|
|
xyes)
|
2009-01-29 20:12:24 -02:00
|
|
|
AC_DEFINE(XTHREADS,1,[Whether libX11 is compiled with thread support])
|
2005-08-21 15:38:39 +00:00
|
|
|
if test x$mtsafeapi = xyes
|
|
|
|
|
then
|
2009-01-29 20:12:24 -02:00
|
|
|
AC_DEFINE(XUSE_MTSAFE_API,1,[Whether libX11 needs to use MT safe API's])
|
2005-08-21 15:38:39 +00:00
|
|
|
fi
|
2005-05-13 22:53:36 +00:00
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
2005-08-21 15:38:39 +00:00
|
|
|
AC_CHECK_LIB(c, pthread_self, [thrstubs="no"], [thrstubs="yes"])
|
|
|
|
|
AM_CONDITIONAL(THRSTUBS, test x$thrstubs = xyes)
|
|
|
|
|
|
2005-08-17 19:46:08 +00:00
|
|
|
dnl XXX incomplete, please fill this in
|
2005-10-16 03:03:35 +00:00
|
|
|
if test x$xthreads = xyes ; then
|
2005-08-17 19:46:08 +00:00
|
|
|
case $host_os in
|
2006-06-03 13:51:51 +03:00
|
|
|
linux*|openbsd*|gnu*|k*bsd*-gnu)
|
2005-08-17 19:46:08 +00:00
|
|
|
XTHREADLIB=-lpthread ;;
|
2006-12-14 14:21:19 -06:00
|
|
|
netbsd*)
|
|
|
|
|
XTHREAD_CFLAGS="-D_POSIX_THREAD_SAFE_FUNCTIONS"
|
|
|
|
|
XTHREADLIB="-lpthread" ;;
|
2005-10-11 02:18:36 +00:00
|
|
|
freebsd*)
|
|
|
|
|
XTHREAD_CFLAGS="-D_THREAD_SAFE"
|
|
|
|
|
XTHREADLIB="-pthread" ;;
|
2006-02-21 14:10:22 -08:00
|
|
|
dragonfly*)
|
|
|
|
|
XTHREADLIB="-pthread" ;;
|
2005-09-24 00:16:32 +00:00
|
|
|
solaris*)
|
|
|
|
|
XTHREAD_CFLAGS="-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" ;;
|
2005-08-17 19:46:08 +00:00
|
|
|
esac
|
|
|
|
|
fi
|
|
|
|
|
AC_SUBST(XTHREADLIB)
|
2005-09-24 00:16:32 +00:00
|
|
|
AC_SUBST(XTHREAD_CFLAGS)
|
|
|
|
|
X11_CFLAGS="$X11_CFLAGS $XTHREAD_CFLAGS"
|
2005-08-17 19:46:08 +00:00
|
|
|
|
2005-05-13 22:53:36 +00:00
|
|
|
case x$xdmauth in
|
|
|
|
|
xyes)
|
|
|
|
|
XDMCP_CFLAGS="$XDMCP_CFLAGS -DHASXDMAUTH"
|
|
|
|
|
;;
|
|
|
|
|
xno)
|
|
|
|
|
XDMCP_LIBS=""
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
AC_SUBST(XDMCP_CFLAGS)
|
|
|
|
|
AC_SUBST(XDMCP_LIBS)
|
|
|
|
|
|
|
|
|
|
AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Find keysymdef.h
|
|
|
|
|
#
|
|
|
|
|
AC_MSG_CHECKING([keysymdef.h])
|
2008-03-15 13:39:13 -04:00
|
|
|
dir=`pkg-config --variable=includedir xproto`
|
2008-03-15 17:32:57 +02:00
|
|
|
KEYSYMDEF="$dir/X11/keysymdef.h"
|
|
|
|
|
if test -f "$KEYSYMDEF"; then
|
|
|
|
|
AC_MSG_RESULT([$KEYSYMDEF])
|
|
|
|
|
else
|
2005-05-13 22:53:36 +00:00
|
|
|
AC_MSG_ERROR([Cannot find keysymdef.h])
|
2008-03-15 17:32:57 +02:00
|
|
|
fi
|
2005-05-13 22:53:36 +00:00
|
|
|
AC_SUBST(KEYSYMDEF)
|
|
|
|
|
|
|
|
|
|
AM_CONDITIONAL(UDC, test xfalse = xtrue)
|
|
|
|
|
|
2008-06-17 14:41:17 -07:00
|
|
|
AC_ARG_ENABLE(xcms,
|
2005-05-13 22:53:36 +00:00
|
|
|
AC_HELP_STRING([--disable-xcms],
|
|
|
|
|
[Disable Xlib support for CMS *EXPERIMENTAL*]),
|
|
|
|
|
[XCMS=$enableval],[XCMS=yes])
|
2005-07-11 08:29:18 +00:00
|
|
|
AM_CONDITIONAL(XCMS, [test x$XCMS = xyes ])
|
|
|
|
|
if test x"$XCMS" = "xyes"; then
|
|
|
|
|
AC_DEFINE(XCMS,1,[Include support for XCMS])
|
|
|
|
|
fi
|
2005-05-13 22:53:36 +00:00
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(xlocale,
|
|
|
|
|
AC_HELP_STRING([--disable-xlocale],
|
|
|
|
|
[Disable Xlib locale implementation *EXPERIMENTAL*]),
|
|
|
|
|
[XLOCALE=$enableval],[XLOCALE=yes])
|
|
|
|
|
|
2005-07-11 08:29:18 +00:00
|
|
|
AM_CONDITIONAL(XLOCALE, [ test x$XLOCALE = xyes ])
|
|
|
|
|
if test x"$XLOCALE" = "xyes"; then
|
|
|
|
|
AC_DEFINE(XLOCALE,1,[support for X Locales])
|
|
|
|
|
fi
|
|
|
|
|
|
2005-06-05 03:29:33 +00:00
|
|
|
# This disables XLOCALEDIR. Set it if you're using BuildLoadableXlibI18n,
|
|
|
|
|
# don't have either issetugid() or getresuid(), and you need to protect
|
|
|
|
|
# clients that are setgid or setuid to an id other than 0.
|
|
|
|
|
AC_MSG_CHECKING([if XLOCALEDIR support should be enabled])
|
|
|
|
|
AC_ARG_ENABLE(xlocaledir,
|
|
|
|
|
AC_HELP_STRING([--enable-xlocaledir],
|
|
|
|
|
[Enable XLOCALEDIR environment variable support]),
|
2005-07-11 08:29:18 +00:00
|
|
|
[ENABLE_XLOCALEDIR=$enableval],[ENABLE_XLOCALEDIR=$XLOCALEDIR_IS_SAFE])
|
2005-10-16 03:03:35 +00:00
|
|
|
if test "x$ENABLE_XLOCALEDIR" = "xno"; then
|
2005-06-05 03:29:33 +00:00
|
|
|
AC_DEFINE(NO_XLOCALEDIR,1,[Disable XLOCALEDIR environment variable])
|
|
|
|
|
fi
|
2005-07-11 08:29:18 +00:00
|
|
|
AC_MSG_RESULT($ENABLE_XLOCALEDIR)
|
2005-06-05 03:29:33 +00:00
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(xf86bigfont,
|
|
|
|
|
AC_HELP_STRING([--disable-xf86bigfont],
|
|
|
|
|
[Disable XF86BigFont extension support]),
|
|
|
|
|
[XF86BIGFONT=$enableval],[XF86BIGFONT="yes"])
|
2005-07-11 08:29:18 +00:00
|
|
|
if test "x$XF86BIGFONT" = "xyes"; then
|
2005-11-14 21:51:07 +00:00
|
|
|
PKG_CHECK_MODULES(BIGFONT, xf86bigfontproto,
|
2005-07-11 08:29:18 +00:00
|
|
|
AC_DEFINE(XF86BIGFONT,1,[Enable XF86BIGFONT extension]),XF86BIGFONT="no")
|
2005-11-14 21:51:07 +00:00
|
|
|
AC_SUBST(BIGFONT_CFLAGS)
|
|
|
|
|
AC_SUBST(BIGFONT_LIBS)
|
2005-06-05 03:29:33 +00:00
|
|
|
fi
|
|
|
|
|
|
2008-06-17 14:41:17 -07:00
|
|
|
AC_ARG_ENABLE(xkb,
|
2005-05-13 22:53:36 +00:00
|
|
|
AC_HELP_STRING([--disable-xkb],
|
|
|
|
|
[Disable XKB support *EXPERIMENTAL*]),
|
|
|
|
|
[XKB=$enableval],[XKB=yes])
|
|
|
|
|
|
2005-10-12 00:04:50 +00:00
|
|
|
XORG_MANPAGE_SECTIONS
|
|
|
|
|
|
2008-06-17 14:41:17 -07:00
|
|
|
AC_ARG_ENABLE(man-pages,
|
|
|
|
|
AC_HELP_STRING([--enable-man-pages=section],
|
2005-07-09 18:44:14 +00:00
|
|
|
[Choose manual section for installing man pages]),
|
2005-10-12 00:04:50 +00:00
|
|
|
[LIBMAN=$enableval],[LIBMAN=yes])
|
2008-06-17 14:41:17 -07:00
|
|
|
|
2005-10-12 00:04:50 +00:00
|
|
|
if test "x$LIBMAN" != "xyes"; then
|
|
|
|
|
LIB_MAN_SUFFIX=$LIBMAN
|
2005-05-13 22:53:36 +00:00
|
|
|
fi
|
|
|
|
|
|
2005-10-12 00:04:50 +00:00
|
|
|
AM_CONDITIONAL(MANPAGES, [ test x$LIBMAN '!=' xno ])
|
2005-05-13 22:53:36 +00:00
|
|
|
|
|
|
|
|
AM_CONDITIONAL(XKB, [ test x$XKB = xyes ])
|
2005-07-11 08:29:18 +00:00
|
|
|
if test x"$XKB" = "xyes"; then
|
2006-11-24 19:57:58 -08:00
|
|
|
XKBPROTO_REQUIRES="kbproto"
|
|
|
|
|
PKG_CHECK_MODULES(XKBPROTO, kbproto inputproto)
|
2005-07-11 08:29:18 +00:00
|
|
|
AC_DEFINE(XKB,1,[Use XKB])
|
2005-05-16 21:48:36 +00:00
|
|
|
X11_CFLAGS="$X11_CFLAGS $XKBPROTO_CFLAGS"
|
|
|
|
|
X11_LIBS="$X11_LIBS $XKBPROTO_LIBS"
|
2005-11-19 07:15:39 +00:00
|
|
|
else
|
|
|
|
|
XKBPROTO_REQUIRES=""
|
2005-05-13 22:53:36 +00:00
|
|
|
fi
|
2005-11-19 07:15:39 +00:00
|
|
|
AC_SUBST(XKBPROTO_REQUIRES)
|
2005-05-13 22:53:36 +00:00
|
|
|
|
2006-06-13 20:23:46 +02:00
|
|
|
AC_FUNC_MMAP()
|
2006-06-16 15:36:40 +02:00
|
|
|
composecache_default=$ac_cv_func_mmap_fixed_mapped
|
|
|
|
|
AC_CHECK_FUNC(nl_langinfo, , [composecache_default=no])
|
2008-06-17 14:41:17 -07:00
|
|
|
AC_ARG_ENABLE(composecache,
|
2006-06-13 20:23:46 +02:00
|
|
|
AC_HELP_STRING([--disable-composecache],
|
|
|
|
|
[Disable compose table cache support]),
|
2006-06-16 15:36:40 +02:00
|
|
|
[COMPOSECACHE=$enableval],[COMPOSECACHE=$composecache_default])
|
2006-06-13 20:23:46 +02:00
|
|
|
if test x"$COMPOSECACHE" = "xyes"; then
|
|
|
|
|
AC_DEFINE(COMPOSECACHE,1,[Include compose table cache support])
|
|
|
|
|
fi
|
|
|
|
|
|
2006-07-24 15:52:00 -07:00
|
|
|
dnl Allow checking code with lint, sparse, etc.
|
|
|
|
|
XORG_WITH_LINT
|
2008-02-15 17:27:53 -08:00
|
|
|
XORG_LINT_LIBRARY([X11])
|
2006-07-24 15:52:00 -07:00
|
|
|
LINT_FLAGS="${LINT_FLAGS} ${X11_CFLAGS} ${XPROTO_CFLAGS}"
|
|
|
|
|
|
2005-05-13 22:53:36 +00:00
|
|
|
if test "x$GCC" = "xyes"; then
|
|
|
|
|
GCC_WARNINGS="-Wall -Wpointer-arith -Wstrict-prototypes \
|
|
|
|
|
-Wmissing-prototypes -Wmissing-declarations \
|
|
|
|
|
-Wnested-externs -fno-strict-aliasing"
|
|
|
|
|
X11_CFLAGS="$GCC_WARNINGS $X11_CFLAGS"
|
|
|
|
|
fi
|
|
|
|
|
|
2007-04-07 14:27:12 +02:00
|
|
|
AC_TRY_COMPILE([
|
|
|
|
|
#include <features.h>
|
|
|
|
|
#ifndef __GLIBC__
|
|
|
|
|
#error not glibc
|
|
|
|
|
#endif
|
|
|
|
|
], [], [AC_DEFINE(_GNU_SOURCE, 1,
|
|
|
|
|
[ Enable GNU and other extensions to the C environment for glibc])])
|
|
|
|
|
|
2006-07-04 12:16:30 +02:00
|
|
|
X11_DATADIR="${datadir}/X11"
|
2006-07-01 21:31:23 -07:00
|
|
|
AC_DEFINE_DIR(X11_DATADIR, X11_DATADIR, [Location of libX11 data])
|
|
|
|
|
AC_SUBST(X11_DATADIR)
|
|
|
|
|
|
2005-07-11 08:29:18 +00:00
|
|
|
X11_LIBDIR="${libdir}/X11"
|
2006-07-01 21:31:23 -07:00
|
|
|
AC_DEFINE_DIR(X11_LIBDIR, X11_LIBDIR, [Location of libX11 library data])
|
|
|
|
|
AC_SUBST(X11_LIBDIR)
|
2005-07-11 08:29:18 +00:00
|
|
|
|
2009-01-28 20:31:42 -02:00
|
|
|
X11_CFLAGS="$CWARNFLAGS $X11_CFLAGS $XPROTO_CFLAGS"
|
2005-11-01 15:11:50 +00:00
|
|
|
AC_SUBST(X11_CFLAGS)
|
|
|
|
|
AC_SUBST(X11_LIBS)
|
|
|
|
|
|
2005-07-11 08:29:18 +00:00
|
|
|
#
|
|
|
|
|
# Yes, it would be nice to put the locale data in
|
|
|
|
|
# /usr/share, but the locale stuff includes loadable
|
|
|
|
|
# libraries which must be located in the same directory
|
|
|
|
|
# as the other locale data, so for now, everything lives
|
|
|
|
|
# in ${libdir}
|
|
|
|
|
#
|
|
|
|
|
|
2006-06-02 01:39:12 +03:00
|
|
|
X11_LOCALEDATADIR="${X11_DATADIR}/locale"
|
2006-07-01 21:31:23 -07:00
|
|
|
AC_DEFINE_DIR(XLOCALEDATADIR, X11_LOCALEDATADIR, [Location of libX11 locale data])
|
|
|
|
|
AC_SUBST(X11_LOCALEDATADIR)
|
|
|
|
|
|
2006-06-02 01:39:12 +03:00
|
|
|
X11_LOCALELIBDIR="${X11_LIBDIR}/locale"
|
2006-07-01 21:31:23 -07:00
|
|
|
AC_DEFINE_DIR(XLOCALELIBDIR, X11_LOCALELIBDIR, [Location of libX11 locale libraries])
|
|
|
|
|
AC_SUBST(X11_LOCALELIBDIR)
|
|
|
|
|
|
2005-07-11 08:29:18 +00:00
|
|
|
X11_LOCALEDIR="${X11_LOCALEDATADIR}"
|
2006-07-01 21:31:23 -07:00
|
|
|
AC_DEFINE_DIR(XLOCALEDIR, X11_LOCALEDIR, [Location of libX11 locale data])
|
|
|
|
|
AC_SUBST(X11_LOCALEDIR)
|
2005-05-13 22:53:36 +00:00
|
|
|
|
2006-07-01 21:31:23 -07:00
|
|
|
XKEYSYMDB="${X11_DATADIR}/XKeysymDB"
|
2005-06-15 13:32:35 +00:00
|
|
|
AC_DEFINE_DIR(XKEYSYMDB, XKEYSYMDB, [Location of keysym database])
|
2006-07-01 21:31:23 -07:00
|
|
|
|
|
|
|
|
XERRORDB="${X11_DATADIR}/XErrorDB"
|
2005-06-15 13:32:35 +00:00
|
|
|
AC_DEFINE_DIR(XERRORDB, XERRORDB, [Location of error message database])
|
2006-07-01 21:31:23 -07:00
|
|
|
|
2005-05-13 22:53:36 +00:00
|
|
|
|
2005-12-03 04:41:47 +00:00
|
|
|
XORG_CHECK_MALLOC_ZERO
|
2005-07-29 21:22:50 +00:00
|
|
|
XORG_RELEASE_VERSION
|
2009-01-28 20:31:42 -02:00
|
|
|
XORG_CHANGELOG
|
2005-07-29 21:22:50 +00:00
|
|
|
|
2005-05-13 22:53:36 +00:00
|
|
|
AC_OUTPUT([Makefile
|
|
|
|
|
include/Makefile
|
|
|
|
|
man/Makefile
|
2008-06-17 14:41:17 -07:00
|
|
|
man/xkb/Makefile
|
2005-05-13 22:53:36 +00:00
|
|
|
src/Makefile
|
|
|
|
|
src/util/Makefile
|
2005-07-11 08:29:18 +00:00
|
|
|
src/xcms/Makefile
|
|
|
|
|
src/xlibi18n/Makefile
|
2005-07-15 04:08:51 +00:00
|
|
|
modules/Makefile
|
|
|
|
|
modules/im/Makefile
|
|
|
|
|
modules/im/ximcp/Makefile
|
|
|
|
|
modules/lc/Makefile
|
|
|
|
|
modules/lc/def/Makefile
|
|
|
|
|
modules/lc/gen/Makefile
|
|
|
|
|
modules/lc/Utf8/Makefile
|
|
|
|
|
modules/lc/xlocale/Makefile
|
|
|
|
|
modules/om/Makefile
|
|
|
|
|
modules/om/generic/Makefile
|
2005-07-11 08:29:18 +00:00
|
|
|
src/xkb/Makefile
|
2005-05-13 22:53:36 +00:00
|
|
|
nls/Makefile
|
2007-08-21 14:56:33 -07:00
|
|
|
nls/am_ET.UTF-8/Makefile
|
2005-05-13 22:53:36 +00:00
|
|
|
nls/armscii-8/Makefile
|
|
|
|
|
nls/C/Makefile
|
2005-10-05 18:27:10 +00:00
|
|
|
nls/el_GR.UTF-8/Makefile
|
2005-05-13 22:53:36 +00:00
|
|
|
nls/en_US.UTF-8/Makefile
|
2009-02-21 12:51:03 -05:00
|
|
|
nls/fi_FI.UTF-8/Makefile
|
2005-05-13 22:53:36 +00:00
|
|
|
nls/georgian-academy/Makefile
|
|
|
|
|
nls/georgian-ps/Makefile
|
|
|
|
|
nls/ibm-cp1133/Makefile
|
|
|
|
|
nls/iscii-dev/Makefile
|
|
|
|
|
nls/isiri-3342/Makefile
|
|
|
|
|
nls/iso8859-1/Makefile
|
|
|
|
|
nls/iso8859-10/Makefile
|
|
|
|
|
nls/iso8859-11/Makefile
|
|
|
|
|
nls/iso8859-13/Makefile
|
|
|
|
|
nls/iso8859-14/Makefile
|
|
|
|
|
nls/iso8859-15/Makefile
|
|
|
|
|
nls/iso8859-2/Makefile
|
|
|
|
|
nls/iso8859-3/Makefile
|
|
|
|
|
nls/iso8859-4/Makefile
|
|
|
|
|
nls/iso8859-5/Makefile
|
|
|
|
|
nls/iso8859-6/Makefile
|
|
|
|
|
nls/iso8859-7/Makefile
|
|
|
|
|
nls/iso8859-8/Makefile
|
|
|
|
|
nls/iso8859-9/Makefile
|
|
|
|
|
nls/iso8859-9e/Makefile
|
|
|
|
|
nls/ja/Makefile
|
|
|
|
|
nls/ja.JIS/Makefile
|
|
|
|
|
nls/ja_JP.UTF-8/Makefile
|
|
|
|
|
nls/ja.S90/Makefile
|
|
|
|
|
nls/ja.SJIS/Makefile
|
|
|
|
|
nls/ja.U90/Makefile
|
|
|
|
|
nls/ko/Makefile
|
|
|
|
|
nls/koi8-c/Makefile
|
|
|
|
|
nls/koi8-r/Makefile
|
|
|
|
|
nls/koi8-u/Makefile
|
|
|
|
|
nls/ko_KR.UTF-8/Makefile
|
|
|
|
|
nls/microsoft-cp1251/Makefile
|
|
|
|
|
nls/microsoft-cp1255/Makefile
|
|
|
|
|
nls/microsoft-cp1256/Makefile
|
|
|
|
|
nls/mulelao-1/Makefile
|
|
|
|
|
nls/nokhchi-1/Makefile
|
|
|
|
|
nls/pt_BR.UTF-8/Makefile
|
|
|
|
|
nls/tatar-cyr/Makefile
|
|
|
|
|
nls/th_TH/Makefile
|
|
|
|
|
nls/th_TH.UTF-8/Makefile
|
|
|
|
|
nls/tscii-0/Makefile
|
|
|
|
|
nls/vi_VN.tcvn/Makefile
|
|
|
|
|
nls/vi_VN.viscii/Makefile
|
|
|
|
|
nls/zh_CN/Makefile
|
|
|
|
|
nls/zh_CN.gb18030/Makefile
|
|
|
|
|
nls/zh_CN.gbk/Makefile
|
|
|
|
|
nls/zh_CN.UTF-8/Makefile
|
|
|
|
|
nls/zh_HK.big5/Makefile
|
|
|
|
|
nls/zh_HK.big5hkscs/Makefile
|
|
|
|
|
nls/zh_HK.UTF-8/Makefile
|
|
|
|
|
nls/zh_TW/Makefile
|
|
|
|
|
nls/zh_TW.big5/Makefile
|
|
|
|
|
nls/zh_TW.UTF-8/Makefile
|
2006-10-05 17:44:22 -07:00
|
|
|
x11.pc
|
|
|
|
|
x11-xcb.pc])
|
2005-07-11 08:29:18 +00:00
|
|
|
|
2007-05-01 14:47:03 +02:00
|
|
|
man_pages_suffix=$LIBMAN_SUFFIX
|
|
|
|
|
if test -z "$man_pages_suffix"; then
|
|
|
|
|
man_pages_suffix=none
|
|
|
|
|
fi
|
|
|
|
|
|
2005-07-11 08:29:18 +00:00
|
|
|
echo ""
|
|
|
|
|
echo "X11 will be built with the following settings:"
|
|
|
|
|
echo " Loadable i18n module support: "$XLIB_LOADABLE_I18N
|
2005-08-06 18:59:49 +00:00
|
|
|
echo " Loadable xcursor library support: "$XLIB_LOADABLE_XCURSOR
|
2006-02-19 11:49:15 -08:00
|
|
|
echo " Use XCB: "$ac_cv_use_xcb
|
2005-07-11 08:29:18 +00:00
|
|
|
echo " Threading support: "$xthreads
|
2005-08-21 15:38:39 +00:00
|
|
|
echo " Use Threads safe API: "$mtsafeapi
|
|
|
|
|
echo " Threads stubs in libX11: "$thrstubs
|
2005-07-11 08:29:18 +00:00
|
|
|
echo " XCMS: "$XCMS
|
|
|
|
|
echo " Internationalization support: "$XLOCALE
|
|
|
|
|
echo " XF86BigFont support: "$XF86BIGFONT
|
|
|
|
|
echo " XKB support: "$XKB
|
|
|
|
|
echo " XLOCALEDIR environment variable support: "$ENABLE_XLOCALEDIR
|
2007-05-01 14:47:03 +02:00
|
|
|
echo " Manual pages suffix: "$man_pages_suffix
|
2006-06-13 20:23:46 +02:00
|
|
|
echo " Compose table cache enabled: "$COMPOSECACHE
|
2005-07-11 08:29:18 +00:00
|
|
|
echo ""
|