2011-01-31 14:50:19 -05:00
|
|
|
|
|
|
|
|
# Initialize Autoconf
|
|
|
|
|
AC_PREREQ([2.60])
|
2011-03-17 16:15:00 -07:00
|
|
|
AC_INIT([libX11], [1.4.2],
|
2011-01-31 14:50:19 -05:00
|
|
|
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libX11])
|
2005-05-13 22:53:36 +00:00
|
|
|
AC_CONFIG_SRCDIR([Makefile.am])
|
2011-01-18 19:37:02 -08:00
|
|
|
AC_CONFIG_HEADERS([src/config.h include/X11/XlibConf.h])
|
2010-04-01 21:46:12 -04:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2010-06-03 11:06:15 -07:00
|
|
|
AC_CANONICAL_BUILD
|
|
|
|
|
AC_CANONICAL_HOST
|
2009-04-17 22:14:47 -07:00
|
|
|
# Set common system defines for POSIX extensions, such as _GNU_SOURCE
|
|
|
|
|
# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL)
|
|
|
|
|
# to avoid autoconf errors.
|
|
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
2010-07-08 14:42:32 -04:00
|
|
|
|
2011-01-31 14:50:19 -05:00
|
|
|
# Initialize Automake
|
|
|
|
|
AM_INIT_AUTOMAKE([foreign dist-bzip2])
|
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
|
|
|
|
|
# Initialize libtool
|
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
|
2010-10-29 22:01:39 -07:00
|
|
|
# Require xorg-macros minimum of 1.11 for disabling fop by default
|
2010-07-08 14:42:32 -04:00
|
|
|
m4_ifndef([XORG_MACROS_VERSION],
|
2010-10-29 22:01:39 -07:00
|
|
|
[m4_fatal([must install xorg-macros 1.11 or later before running autoconf/autogen])])
|
|
|
|
|
XORG_MACROS_VERSION(1.11)
|
2009-11-29 10:44:24 -05:00
|
|
|
XORG_DEFAULT_OPTIONS
|
2010-01-31 14:16:20 -05:00
|
|
|
XORG_ENABLE_SPECS
|
2010-07-08 14:42:32 -04:00
|
|
|
XORG_WITH_XMLTO(0.0.20)
|
2010-10-22 19:09:07 -07:00
|
|
|
XORG_WITH_FOP([no])
|
2010-07-08 14:42:32 -04:00
|
|
|
XORG_CHECK_SGML_DOCTOOLS(1.5)
|
2010-08-09 09:39:26 -04:00
|
|
|
XORG_PROG_RAWCPP
|
2009-04-17 22:14:47 -07:00
|
|
|
|
2011-01-31 14:50:19 -05:00
|
|
|
# Required when PKG_CHECK_MODULES called within an if statement
|
2010-06-03 11:06:15 -07:00
|
|
|
PKG_PROG_PKG_CONFIG
|
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
|
|
|
|
2010-06-03 11:06:15 -07:00
|
|
|
if test x"$CPPFLAGS_FOR_BUILD" = x; then
|
|
|
|
|
if test ! x"$cross_compiling" = xyes; then
|
|
|
|
|
CPPFLAGS_FOR_BUILD=${CPPFLAGS}
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
AC_SUBST(CPPFLAGS_FOR_BUILD)
|
|
|
|
|
|
|
|
|
|
if test x"$CFLAGS_FOR_BUILD" = x; then
|
|
|
|
|
if test ! x"$cross_compiling" = xyes; then
|
|
|
|
|
CFLAGS_FOR_BUILD=${CFLAGS}
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
AC_SUBST(CFLAGS_FOR_BUILD)
|
|
|
|
|
|
|
|
|
|
if test x"$LDFLAGS_FOR_BUILD" = x; then
|
|
|
|
|
if test ! x"$cross_compiling" = xyes; then
|
|
|
|
|
LDFLAGS_FOR_BUILD=${LDFLAGS}
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
AC_SUBST(LDFLAGS_FOR_BUILD)
|
|
|
|
|
|
2010-09-11 00:49:21 -07:00
|
|
|
# Find perl for "make check" tests in nls/Makefile.am
|
2009-04-15 10:56:09 -07:00
|
|
|
AC_ARG_WITH(perl,
|
2011-01-28 16:07:07 -05:00
|
|
|
AS_HELP_STRING([--with-perl=<path>],
|
2009-04-15 10:56:09 -07:00
|
|
|
[path to perl interpreter for build-time tests]),
|
|
|
|
|
[PERL=$withval ; AC_MSG_CHECKING([perl]) ;
|
|
|
|
|
AC_MSG_RESULT([(from --with-perl) $PERL])],
|
|
|
|
|
AC_CHECK_PROGS([PERL], [perl], [no]))
|
|
|
|
|
AM_CONDITIONAL(HAVE_PERL, test x$PERL != xno)
|
|
|
|
|
|
2005-05-13 22:53:36 +00:00
|
|
|
# Checks for pkg-config packages
|
2010-01-05 18:02:37 -08:00
|
|
|
|
|
|
|
|
# Always required
|
2010-06-03 09:41:01 -07:00
|
|
|
X11_REQUIRES='xproto >= 7.0.13 xextproto xtrans xcb >= 1.1.92'
|
|
|
|
|
X11_EXTRA_DEPS="xcb >= 1.1.92"
|
2005-05-17 22:32:09 +00:00
|
|
|
|
2010-01-14 08:04:28 -08:00
|
|
|
PKG_PROG_PKG_CONFIG()
|
|
|
|
|
|
2006-11-07 09:32:00 -08:00
|
|
|
AC_SUBST(X11_EXTRA_DEPS)
|
2005-05-13 22:53:36 +00:00
|
|
|
|
2011-01-31 14:50:19 -05:00
|
|
|
# Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro
|
|
|
|
|
# was not expanded, since libX11 with no transport types is rather useless.
|
|
|
|
|
#
|
|
|
|
|
# If you're seeing an error here, be sure you installed the lib/xtrans module
|
|
|
|
|
# first and if it's not in the default location, that you set the ACLOCAL
|
|
|
|
|
# environment variable to find it, such as:
|
|
|
|
|
# ACLOCAL="aclocal -I ${PREFIX}/share/aclocal"
|
2009-10-06 16:11:24 +02:00
|
|
|
m4_pattern_forbid([^XTRANS_CONNECTION_FLAGS$])
|
2005-09-02 23:00:30 +00:00
|
|
|
|
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])
|
2010-06-03 11:20:26 -07:00
|
|
|
DEFAULT_LOCAL_TRANS=""
|
2008-06-18 20:00:25 -07:00
|
|
|
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.
|
2010-06-03 11:20:26 -07:00
|
|
|
if test "$UNIXCONN" = "yes" ; then
|
|
|
|
|
if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
|
|
|
|
|
fi
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}UNIX_TRANS"
|
|
|
|
|
fi
|
|
|
|
|
if test "$LOCALCONN" = "yes" ; then
|
|
|
|
|
if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
|
|
|
|
|
fi
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}LOCAL_TRANS"
|
|
|
|
|
fi
|
|
|
|
|
if test "$TCPCONN" = "yes" ; then
|
|
|
|
|
if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
|
|
|
|
|
fi
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}TCP_TRANS"
|
|
|
|
|
fi
|
2008-06-18 20:00:25 -07:00
|
|
|
;;
|
2010-06-03 11:17:45 -07:00
|
|
|
linux*)
|
|
|
|
|
# LOCAL_TRANS is used for abstract sockets.
|
2010-06-03 11:20:26 -07:00
|
|
|
if test "$UNIXCONN" = "yes" ; then
|
|
|
|
|
if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
|
|
|
|
|
fi
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}LOCAL_TRANS,UNIX_TRANS"
|
|
|
|
|
fi
|
|
|
|
|
if test "$TCPCONN" = "yes" ; then
|
|
|
|
|
if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
|
|
|
|
|
fi
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}TCP_TRANS"
|
|
|
|
|
fi
|
2010-06-03 11:17:45 -07:00
|
|
|
;;
|
2008-06-18 20:00:25 -07:00
|
|
|
*)
|
2010-06-03 11:20:26 -07:00
|
|
|
if test "$LOCALCONN" = "yes" ; then
|
|
|
|
|
if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
|
|
|
|
|
fi
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}LOCAL_TRANS"
|
|
|
|
|
fi
|
|
|
|
|
if test "$UNIXCONN" = "yes" ; then
|
|
|
|
|
if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
|
|
|
|
|
fi
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}UNIX_TRANS"
|
|
|
|
|
fi
|
|
|
|
|
if test "$TCPCONN" = "yes" ; then
|
|
|
|
|
if test ! "x$DEFAULT_LOCAL_TRANS" = "x" ; then
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS},"
|
|
|
|
|
fi
|
|
|
|
|
DEFAULT_LOCAL_TRANS="${DEFAULT_LOCAL_TRANS}TCP_TRANS"
|
2008-06-18 20:00:25 -07:00
|
|
|
fi
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
AC_ARG_WITH(local-transport-order,
|
2011-01-28 16:07:07 -05:00
|
|
|
AS_HELP_STRING([--with-local-transport-order=LIST], [preference sorted list of transport types to try for local connections]),
|
2008-06-18 20:00:25 -07:00
|
|
|
[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,
|
2011-01-28 16:07:07 -05:00
|
|
|
AS_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,
|
2011-01-28 16:07:07 -05:00
|
|
|
AS_HELP_STRING([--disable-loadable-xcursor],
|
2005-07-11 08:29:18 +00:00
|
|
|
[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.
|
2009-02-10 17:47:25 +00:00
|
|
|
AC_CHECK_HEADERS([sys/select.h])
|
2005-05-13 22:53:36 +00:00
|
|
|
|
|
|
|
|
# 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
|
2011-01-31 14:50:19 -05:00
|
|
|
# AC_PATH_XTRA
|
2005-05-13 22:53:36 +00:00
|
|
|
|
|
|
|
|
# arch specific things
|
2005-07-09 18:44:14 +00:00
|
|
|
WCHAR32="1"
|
2010-11-06 21:58:10 +00:00
|
|
|
case $host_os in
|
2010-11-06 21:58:09 +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
|
2010-07-12 16:52:12 -07:00
|
|
|
AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no], [$PATH$PATH_SEPARATOR/sbin])
|
2007-12-10 23:00:44 -08:00
|
|
|
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,
|
2011-01-28 16:07:07 -05:00
|
|
|
AS_HELP_STRING([--disable-xthreads],
|
2005-05-13 22:53:36 +00:00
|
|
|
[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)
|
|
|
|
|
|
2011-01-31 14:50:19 -05:00
|
|
|
# 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)
|
2005-08-17 19:46:08 +00:00
|
|
|
|
2005-05-13 22:53:36 +00:00
|
|
|
AC_CHECK_FUNC(poll, [AC_DEFINE(USE_POLL, 1, [poll() function is available])], )
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Find keysymdef.h
|
|
|
|
|
#
|
2010-06-15 18:48:48 +01:00
|
|
|
AC_MSG_CHECKING([keysym definitions])
|
|
|
|
|
KEYSYMDEFDIR=`$PKG_CONFIG --variable=includedir xproto`/X11
|
|
|
|
|
FILES="keysymdef.h XF86keysym.h Sunkeysym.h DECkeysym.h HPkeysym.h"
|
|
|
|
|
for i in $FILES; do
|
|
|
|
|
if test -f "$KEYSYMDEFDIR/$i"; then
|
|
|
|
|
KEYSYMDEFS="$KEYSYMDEFS $KEYSYMDEFDIR/$i"
|
|
|
|
|
elif test "x$i" = "xkeysymdef.h"; then
|
|
|
|
|
AC_MSG_ERROR([Cannot find keysymdef.h])
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
AC_MSG_RESULT([$KEYSYMDEFS])
|
|
|
|
|
AC_SUBST(KEYSYMDEFS)
|
2005-05-13 22:53:36 +00:00
|
|
|
|
|
|
|
|
AM_CONDITIONAL(UDC, test xfalse = xtrue)
|
|
|
|
|
|
2008-06-17 14:41:17 -07:00
|
|
|
AC_ARG_ENABLE(xcms,
|
2011-01-28 16:07:07 -05:00
|
|
|
AS_HELP_STRING([--disable-xcms],
|
2005-05-13 22:53:36 +00:00
|
|
|
[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,
|
2011-01-28 16:07:07 -05:00
|
|
|
AS_HELP_STRING([--disable-xlocale],
|
2005-05-13 22:53:36 +00:00
|
|
|
[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,
|
2011-01-28 16:07:07 -05:00
|
|
|
AS_HELP_STRING([--enable-xlocaledir],
|
2005-06-05 03:29:33 +00:00
|
|
|
[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,
|
2011-01-28 16:07:07 -05:00
|
|
|
AS_HELP_STRING([--disable-xf86bigfont],
|
2005-06-05 03:29:33 +00:00
|
|
|
[Disable XF86BigFont extension support]),
|
|
|
|
|
[XF86BIGFONT=$enableval],[XF86BIGFONT="yes"])
|
2005-07-11 08:29:18 +00:00
|
|
|
if test "x$XF86BIGFONT" = "xyes"; then
|
2011-01-16 11:40:59 -08:00
|
|
|
PKG_CHECK_MODULES(BIGFONT, [xf86bigfontproto >= 1.2.0],
|
2005-07-11 08:29:18 +00:00
|
|
|
AC_DEFINE(XF86BIGFONT,1,[Enable XF86BIGFONT extension]),XF86BIGFONT="no")
|
2005-06-05 03:29:33 +00:00
|
|
|
fi
|
|
|
|
|
|
2008-06-17 14:41:17 -07:00
|
|
|
AC_ARG_ENABLE(xkb,
|
2011-01-28 16:07:07 -05:00
|
|
|
AS_HELP_STRING([--disable-xkb],
|
2005-05-13 22:53:36 +00:00
|
|
|
[Disable XKB support *EXPERIMENTAL*]),
|
|
|
|
|
[XKB=$enableval],[XKB=yes])
|
|
|
|
|
|
|
|
|
|
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"
|
2010-01-05 18:02:37 -08:00
|
|
|
X11_REQUIRES="${X11_REQUIRES} kbproto inputproto"
|
2005-07-11 08:29:18 +00:00
|
|
|
AC_DEFINE(XKB,1,[Use XKB])
|
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,
|
2011-01-28 16:07:07 -05:00
|
|
|
AS_HELP_STRING([--disable-composecache],
|
2006-06-13 20:23:46 +02:00
|
|
|
[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
|
|
|
|
|
|
2011-01-31 14:50:19 -05:00
|
|
|
# Allow checking code with lint, sparse, etc.
|
2006-07-24 15:52:00 -07:00
|
|
|
XORG_WITH_LINT
|
2008-02-15 17:27:53 -08:00
|
|
|
XORG_LINT_LIBRARY([X11])
|
2006-07-24 15:52:00 -07:00
|
|
|
|
2006-07-04 12:16:30 +02:00
|
|
|
X11_DATADIR="${datadir}/X11"
|
2010-06-15 17:20:48 +01:00
|
|
|
AX_DEFINE_DIR(X11_DATADIR, X11_DATADIR, [Location of libX11 data])
|
2006-07-01 21:31:23 -07:00
|
|
|
AC_SUBST(X11_DATADIR)
|
|
|
|
|
|
2005-07-11 08:29:18 +00:00
|
|
|
X11_LIBDIR="${libdir}/X11"
|
2010-04-01 21:46:12 -04:00
|
|
|
AX_DEFINE_DIR(X11_LIBDIR, X11_LIBDIR, [Location of libX11 library data])
|
2006-07-01 21:31:23 -07:00
|
|
|
AC_SUBST(X11_LIBDIR)
|
2005-07-11 08:29:18 +00:00
|
|
|
|
2010-01-05 18:02:37 -08:00
|
|
|
PKG_CHECK_MODULES(X11, [$X11_REQUIRES])
|
2010-02-16 10:37:21 -05:00
|
|
|
X11_CFLAGS="$X11_CFLAGS $XTHREAD_CFLAGS"
|
2005-11-01 15:11:50 +00:00
|
|
|
|
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"
|
2010-06-15 17:20:48 +01:00
|
|
|
AX_DEFINE_DIR(XLOCALEDATADIR, X11_LOCALEDATADIR, [Location of libX11 locale data])
|
2006-07-01 21:31:23 -07:00
|
|
|
AC_SUBST(X11_LOCALEDATADIR)
|
|
|
|
|
|
2009-02-23 19:29:15 -08:00
|
|
|
AC_ARG_WITH(locale-lib-dir, AS_HELP_STRING([--with-locale-lib-dir=DIR],
|
|
|
|
|
[Directory where locale libraries files are installed (default: $libdir/X11/locale)]),
|
|
|
|
|
[ X11_LOCALELIBDIR="$withval" ],
|
|
|
|
|
[ X11_LOCALELIBDIR="${X11_LIBDIR}/locale" ])
|
2010-06-15 17:20:48 +01:00
|
|
|
AX_DEFINE_DIR(XLOCALELIBDIR, X11_LOCALELIBDIR, [Location of libX11 locale libraries])
|
2006-07-01 21:31:23 -07:00
|
|
|
AC_SUBST(X11_LOCALELIBDIR)
|
|
|
|
|
|
2005-07-11 08:29:18 +00:00
|
|
|
X11_LOCALEDIR="${X11_LOCALEDATADIR}"
|
2010-06-15 17:20:48 +01:00
|
|
|
AX_DEFINE_DIR(XLOCALEDIR, X11_LOCALEDIR, [Location of libX11 locale data])
|
2006-07-01 21:31:23 -07:00
|
|
|
AC_SUBST(X11_LOCALEDIR)
|
2005-05-13 22:53:36 +00:00
|
|
|
|
2006-07-01 21:31:23 -07:00
|
|
|
XKEYSYMDB="${X11_DATADIR}/XKeysymDB"
|
2010-06-15 17:20:48 +01:00
|
|
|
AX_DEFINE_DIR(XKEYSYMDB, XKEYSYMDB, [Location of keysym database])
|
2006-07-01 21:31:23 -07:00
|
|
|
|
|
|
|
|
XERRORDB="${X11_DATADIR}/XErrorDB"
|
2010-06-15 17:20:48 +01:00
|
|
|
AX_DEFINE_DIR(XERRORDB, XERRORDB, [Location of error message database])
|
2006-07-01 21:31:23 -07:00
|
|
|
|
2005-12-03 04:41:47 +00:00
|
|
|
XORG_CHECK_MALLOC_ZERO
|
2005-07-29 21:22:50 +00:00
|
|
|
|
2011-01-31 14:50:19 -05:00
|
|
|
AC_CONFIG_FILES([Makefile
|
|
|
|
|
include/Makefile
|
|
|
|
|
man/Makefile
|
|
|
|
|
man/xkb/Makefile
|
|
|
|
|
src/Makefile
|
|
|
|
|
src/util/Makefile
|
|
|
|
|
src/xcms/Makefile
|
|
|
|
|
src/xlibi18n/Makefile
|
|
|
|
|
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
|
|
|
|
|
src/xkb/Makefile
|
|
|
|
|
nls/Makefile
|
|
|
|
|
specs/Makefile
|
|
|
|
|
specs/i18n/Makefile
|
|
|
|
|
specs/i18n/framework/Makefile
|
|
|
|
|
specs/i18n/localedb/Makefile
|
|
|
|
|
specs/i18n/trans/Makefile
|
|
|
|
|
specs/libX11/Makefile
|
|
|
|
|
specs/XIM/Makefile
|
|
|
|
|
specs/XKB/Makefile
|
|
|
|
|
x11.pc
|
|
|
|
|
x11-xcb.pc])
|
|
|
|
|
AC_OUTPUT
|
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
|
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
|
2006-06-13 20:23:46 +02:00
|
|
|
echo " Compose table cache enabled: "$COMPOSECACHE
|
2010-01-31 14:16:20 -05:00
|
|
|
echo " Functional specs building enabled: "$build_specs
|
2005-07-11 08:29:18 +00:00
|
|
|
echo ""
|