From: Ran Benita Date: Sat, 10 Aug 2019 11:11:36 +0000 (+0300) Subject: build: remove autotools build X-Git-Tag: xkbcommon-0.9.0~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=25cd67daf7ef7a4bfe49a2b91b2fe085e36ae786;p=platform%2Fupstream%2Flibxkbcommon.git build: remove autotools build We introduced meson 2 years ago, hopefully that's was enough time for everyone to convert. Signed-off-by: Ran Benita --- diff --git a/.azure-pipelines/steps/autotools.yml b/.azure-pipelines/steps/autotools.yml deleted file mode 100644 index 51dfe66..0000000 --- a/.azure-pipelines/steps/autotools.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -parameters: - compiler: "" - options: "" - workdir: "autotools-build" - -steps: - - bash: | - export COMPILER=${{ parameters.compiler }} - case ${COMPILER:-default} in - clang ) export CC=clang CXX=clang++ ;; - gcc ) export CC=gcc CXX=g++ ;; - esac - mkdir '${{ parameters.workdir }}' && cd "$_" - ../autogen.sh ${{ parameters.options }} - displayName: 'Configuration (Autotools)' - - bash: make -j$(nproc) - displayName: 'Build (Autotools)' - workingDirectory: ${{ parameters.workdir }} - - bash: make check - displayName: 'Tests (Autotools)' - workingDirectory: ${{ parameters.workdir }} - - bash: | - shopt -s nullglob - for file in "$(pwd)"/*.log ; do - echo "##vso[task.uploadfile]${file}" - done - displayName: 'Save Results (Autotools)' - condition: always() diff --git a/.azure-pipelines/steps/dependencies-linux.yml b/.azure-pipelines/steps/dependencies-linux.yml index 78f59a6..76ef5be 100644 --- a/.azure-pipelines/steps/dependencies-linux.yml +++ b/.azure-pipelines/steps/dependencies-linux.yml @@ -8,6 +8,6 @@ steps: python -m pip install --upgrade pip meson sudo apt update -y sudo env DEBIAN_FRONTEND=noninteractive apt install -y \ - xutils-dev doxygen libxcb-xkb-dev valgrind ninja-build \ + doxygen libxcb-xkb-dev valgrind ninja-build \ libwayland-dev wayland-protocols bison graphviz displayName: 'Dependencies (GNU/Linux)' diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 9f41db9..0000000 --- a/Makefile.am +++ /dev/null @@ -1,337 +0,0 @@ -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = xkbcommon.pc - -ACLOCAL_AMFLAGS = -I m4 - -EXTRA_DIST = \ - scripts/makeheader \ - scripts/makekeys \ - scripts/update-keysyms \ - scripts/update-keywords \ - scripts/doxygen-wrapper \ - src/xkbcomp/keywords.gperf \ - fuzz \ - test/data \ - test/xkeyboard-config-test.py.in \ - README.md \ - doc/quick-guide.md \ - doc/compat.md \ - doc/keymap-format-text-v1.md \ - doc/rules-format.txt \ - doc/doxygen-extra.css \ - xkbcommon.map \ - xkbcommon-x11.map \ - PACKAGING \ - LICENSE \ - meson.build \ - meson_options.txt \ - test/symbols-leak-test.bash - -# The constants are added here instead of using AC_DEFINE_UNQUOTED -# because it does not expand variables recursively. -AM_CPPFLAGS = \ - -DDFLT_XKB_CONFIG_ROOT='"$(XKBCONFIGROOT)"' \ - -DXLOCALEDIR='"$(XLOCALEDIR)"' \ - -I$(top_srcdir)/src \ - -I$(top_builddir)/src/xkbcomp \ - -include $(top_builddir)/src/config.h - -AM_CFLAGS = $(BASE_CFLAGS) - -AM_LDFLAGS = -no-undefined -if HAVE_NO_UNDEFINED -AM_LDFLAGS += -Wl,--no-undefined -endif - -AM_YFLAGS = -d -p _xkbcommon_ - -xkbcommonincludedir = $(includedir)/xkbcommon -xkbcommoninclude_HEADERS = \ - xkbcommon/xkbcommon.h \ - xkbcommon/xkbcommon-compat.h \ - xkbcommon/xkbcommon-compose.h \ - xkbcommon/xkbcommon-keysyms.h \ - xkbcommon/xkbcommon-names.h - -lib_LTLIBRARIES = libxkbcommon.la -libxkbcommon_la_SOURCES = \ - src/compose/parser.c \ - src/compose/parser.h \ - src/compose/paths.c \ - src/compose/paths.h \ - src/compose/state.c \ - src/compose/table.c \ - src/compose/table.h \ - src/xkbcomp/action.c \ - src/xkbcomp/action.h \ - src/xkbcomp/ast.h \ - src/xkbcomp/ast-build.c \ - src/xkbcomp/ast-build.h \ - src/xkbcomp/compat.c \ - src/xkbcomp/expr.c \ - src/xkbcomp/expr.h \ - src/xkbcomp/include.c \ - src/xkbcomp/include.h \ - src/xkbcomp/keycodes.c \ - src/xkbcomp/keymap.c \ - src/xkbcomp/keymap-dump.c \ - src/xkbcomp/keywords.c \ - src/xkbcomp/parser.y \ - src/xkbcomp/parser-priv.h \ - src/xkbcomp/rules.c \ - src/xkbcomp/rules.h \ - src/xkbcomp/scanner.c \ - src/xkbcomp/symbols.c \ - src/xkbcomp/types.c \ - src/xkbcomp/vmod.c \ - src/xkbcomp/vmod.h \ - src/xkbcomp/xkbcomp.c \ - src/xkbcomp/xkbcomp-priv.h \ - src/atom.c \ - src/atom.h \ - src/context.c \ - src/context.h \ - src/context-priv.c \ - src/darray.h \ - src/keysym.c \ - src/keysym.h \ - src/keysym-utf.c \ - src/ks_tables.h \ - src/keymap.c \ - src/keymap.h \ - src/keymap-priv.c \ - src/scanner-utils.h \ - src/state.c \ - src/text.c \ - src/text.h \ - src/utf8.c \ - src/utf8.h \ - src/utils.c \ - src/utils.h -if HAVE_VERSION_SCRIPT -libxkbcommon_la_LDFLAGS = -Wl,--version-script=${top_srcdir}/xkbcommon.map -endif HAVE_VERSION_SCRIPT - -if ENABLE_X11 -pkgconfig_DATA += xkbcommon-x11.pc - -xkbcommon_x11includedir = $(xkbcommonincludedir) -xkbcommon_x11include_HEADERS = \ - xkbcommon/xkbcommon-x11.h - -lib_LTLIBRARIES += libxkbcommon-x11.la - -libxkbcommon_x11_la_CFLAGS = $(AM_CFLAGS) $(XCB_XKB_CFLAGS) -libxkbcommon_x11_la_CPPFLAGS = $(AM_CPPFLAGS) -libxkbcommon_x11_la_LIBADD = libxkbcommon.la $(XCB_XKB_LIBS) -if HAVE_VERSION_SCRIPT -libxkbcommon_x11_la_LDFLAGS = -Wl,--version-script=${top_srcdir}/xkbcommon-x11.map -endif HAVE_VERSION_SCRIPT - -libxkbcommon_x11_la_SOURCES = \ - src/x11/keymap.c \ - src/x11/state.c \ - src/x11/util.c \ - src/x11/x11-priv.h \ - src/context.h \ - src/context-priv.c \ - src/keymap.h \ - src/keymap-priv.c \ - src/atom.h \ - src/atom.c -endif ENABLE_X11 - -BUILT_SOURCES = \ - src/xkbcomp/parser.c \ - src/xkbcomp/parser.h -CLEANFILES = $(BUILT_SOURCES) - -src/xkbcomp/parser.c: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp) -src/xkbcomp/parser.h: $(top_builddir)/src/$(am__dirstamp) $(top_builddir)/src/xkbcomp/$(am__dirstamp) - -## -# Documentation -## - -if ENABLE_DOCS -if HAVE_DOXYGEN -doxygen_input = \ - README.md \ - doc/quick-guide.md \ - doc/compat.md \ - xkbcommon/xkbcommon.h \ - xkbcommon/xkbcommon-names.h \ - xkbcommon/xkbcommon-x11.h \ - xkbcommon/xkbcommon-compose.h - -doc/html: doc/Doxyfile $(doxygen_input) - $(AM_V_GEN)(\ - cat $<; \ - echo "INPUT = $(doxygen_input)"; \ - echo "OUTPUT_DIRECTORY = $(abs_top_builddir)/doc"; \ - ) | $(top_srcdir)/scripts/doxygen-wrapper "$(DOXYGEN)" - "$(abs_top_srcdir)" -clean-doxygen: - rm -rf doc/html - -doc: doc/html -clean-doc: clean-doxygen -all-local:: doc -clean-local:: clean-doc - -install-data-local:: doc - $(MKDIR_P) $(DESTDIR)$(htmldir)/html - $(INSTALL_DATA) doc/html/* $(DESTDIR)$(htmldir)/html - -uninstall-local:: - rm -rf $(DESTDIR)$(htmldir) -endif HAVE_DOXYGEN -endif ENABLE_DOCS - -## -# Tests -## - -# Some tests need to use unexported symbols, so we link them against -# a private copy of libxkbcommon with all symbols exposed. -check_LTLIBRARIES = libtest.la -libtest_la_SOURCES = \ - $(libxkbcommon_la_SOURCES) \ - test/common.c \ - test/test.h \ - test/evdev-scancodes.h - -AM_TESTS_ENVIRONMENT = \ - XKB_LOG_LEVEL=debug; export XKB_LOG_LEVEL; \ - XKB_LOG_VERBOSITY=10; export XKB_LOG_VERBOSITY; \ - $(XORG_MALLOC_DEBUG_ENV) \ - top_srcdir=$(top_srcdir) \ - top_builddir=$(top_builddir) - -build_run_tests = \ - test/keysym \ - test/keymap \ - test/filecomp \ - test/context \ - test/rules-file \ - test/stringcomp \ - test/buffercomp \ - test/log \ - test/atom \ - test/utf8 \ - test/state \ - test/keyseq \ - test/rulescomp \ - test/compose -build_only_tests = \ - test/rmlvo-to-kccgst \ - test/rmlvo-to-keymap \ - test/print-compiled-keymap -run_only_tests = \ - test/symbols-leak-test.bash - -TESTS_LDADD = libtest.la - -test_keysym_LDADD = $(TESTS_LDADD) -test_keymap_LDADD = $(TESTS_LDADD) -test_filecomp_LDADD = $(TESTS_LDADD) -test_context_LDADD = $(TESTS_LDADD) -test_rules_file_CFLAGS = $(AM_CFLAGS) -Wno-declaration-after-statement -test_rules_file_LDADD = $(TESTS_LDADD) -test_stringcomp_LDADD = $(TESTS_LDADD) -test_buffercomp_LDADD = $(TESTS_LDADD) -test_log_LDADD = $(TESTS_LDADD) -test_atom_LDADD = $(TESTS_LDADD) -test_utf8_LDADD = $(TESTS_LDADD) -test_state_LDADD = $(TESTS_LDADD) -test_keyseq_LDADD = $(TESTS_LDADD) -test_rulescomp_LDADD = $(TESTS_LDADD) -test_rmlvo_to_kccgst_LDADD = $(TESTS_LDADD) -test_rmlvo_to_keymap_LDADD = $(TESTS_LDADD) -test_print_compiled_keymap_LDADD = $(TESTS_LDADD) -test_compose_LDADD = $(TESTS_LDADD) $(RT_LIBS) - -if BUILD_LINUX_TESTS -build_only_tests += \ - test/interactive-evdev - -test_interactive_evdev_LDADD = $(TESTS_LDADD) -endif BUILD_LINUX_TESTS - -if ENABLE_X11 -build_run_tests += \ - test/x11 -# test/x11comp is meant to be run, but it is (temporarily?) disabled. -# See: https://github.com/xkbcommon/libxkbcommon/issues/30 -build_only_tests += \ - test/x11comp \ - test/interactive-x11 - -TESTS_X11_LDADD = $(XCB_XKB_LIBS) $(TESTS_LDADD) libxkbcommon-x11.la -TESTS_X11_CFLAGS = $(XCB_XKB_CFLAGS) - -test_x11_LDADD = $(TESTS_X11_LDADD) -test_x11_CFLAGS = $(TESTS_X11_CFLAGS) -test_x11comp_LDADD = $(TESTS_X11_LDADD) -test_x11comp_CFLAGS = $(TESTS_X11_CFLAGS) -test_interactive_x11_LDADD = $(TESTS_X11_LDADD) -test_interactive_x11_CFLAGS = $(TESTS_X11_CFLAGS) -endif ENABLE_X11 - -if ENABLE_WAYLAND -build_only_tests += \ - test/interactive-wayland - -TESTS_WAYLAND_LDADD = $(WAYLAND_LIBS) $(TESTS_LDADD) -TESTS_WAYLAND_CFLAGS = $(WAYLAND_CFLAGS) - -.SECONDEXPANSION: - -define protostability -$(if $(findstring unstable,$1),unstable,stable) -endef - -define protoname -$(shell echo $1 | sed 's/\([a-z\-]\+\)-[a-z]\+-v[0-9]\+/\1/') -endef - -%-protocol.c: $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml - $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@ -%-client-protocol.h: $(WAYLAND_PROTOCOLS_DATADIR)/$$(call protostability,$$*)/$$(call protoname,$$*)/$$*.xml - $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@ - -INTERACTIVE_WL_XDG_SHELL_SRCS = \ - xdg-shell-protocol.c \ - xdg-shell-client-protocol.h - -test_interactive_wayland_SOURCES = \ - test/interactive-wayland.c \ - $(INTERACTIVE_WL_XDG_SHELL_SRCS) -test_interactive_wayland_LDADD = $(TESTS_WAYLAND_LDADD) -test_interactive_wayland_CFLAGS = $(TESTS_WAYLAND_CFLAGS) - -BUILT_SOURCES += \ - $(INTERACTIVE_WL_XDG_SHELL_SRCS) -endif - -check_PROGRAMS = $(build_run_tests) $(build_only_tests) -TESTS = $(build_run_tests) $(run_only_tests) - -## -# Benchmarks -## -check_LTLIBRARIES += libbench.la -libbench_la_SOURCES = \ - bench/bench.c \ - bench/bench.h -BENCH_LDADD = libbench.la -BENCH_LDADD += $(TESTS_LDADD) $(RT_LIBS) - -check_PROGRAMS += \ - bench/key-proc \ - bench/rules \ - bench/rulescomp \ - bench/compose -bench_key_proc_LDADD = $(BENCH_LDADD) -bench_rules_LDADD = $(BENCH_LDADD) -bench_rulescomp_LDADD = $(BENCH_LDADD) -bench_compose_LDADD = $(BENCH_LDADD) diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index c7467f1..0000000 --- a/autogen.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -e - -srcdir=`dirname "$0"` -test -z "$srcdir" && srcdir=. - -ORIGDIR=`pwd` -cd "$srcdir" - -autoreconf --verbose --install --force --warnings=all -cd "$ORIGDIR" - -if test -z "$NOCONFIGURE"; then - exec "$srcdir/configure" "$@" -fi diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 72e1f4a..3479aec 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,6 +1,6 @@ --- jobs: - - job: 'Meson' + - job: 'Linux' dependsOn: [] strategy: matrix: @@ -17,21 +17,6 @@ jobs: compiler: $(compiler) options: -Denable-wayland=false wrapper: valgrind --leak-check=full --track-origins=yes --error-exitcode=99 - - job: 'Autotools' - dependsOn: [] - strategy: - matrix: - Clang: - compiler: clang - GCC: - compiler: gcc - pool: - vmImage: 'ubuntu-16.04' - steps: - - template: .azure-pipelines/steps/dependencies-linux.yml - - template: .azure-pipelines/steps/autotools.yml - parameters: - compiler: $(compiler) - job: 'macOS' dependsOn: [] pool: diff --git a/configure.ac b/configure.ac deleted file mode 100644 index c32600d..0000000 --- a/configure.ac +++ /dev/null @@ -1,224 +0,0 @@ -dnl Copyright © 2008 Dan Nicholson -dnl -dnl Permission to use, copy, modify, distribute, and sell this software and its -dnl documentation for any purpose is hereby granted without fee, provided that -dnl the above copyright notice appear in all copies and that both that -dnl copyright notice and this permission notice appear in supporting -dnl documentation, and that the name of Keith Packard not be used in -dnl advertising or publicity pertaining to distribution of the software without -dnl specific, written prior permission. Keith Packard makes no -dnl representations about the suitability of this software for any purpose. It -dnl is provided "as is" without express or implied warranty. -dnl -dnl DAN NICHOLSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR -dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -dnl PERFORMANCE OF THIS SOFTWARE. -dnl -dnl Process this file with autoconf to create configure. - -# Initialize Autoconf -AC_PREREQ([2.63]) -AC_INIT([libxkbcommon], [0.8.4], - [https://github.com/xkbcommon/libxkbcommon/issues], - [libxkbcommon], [https://xkbcommon.org]) -AC_CONFIG_SRCDIR([Makefile.am]) -AC_CONFIG_HEADERS([src/config.h]) -AC_CONFIG_MACRO_DIR([m4]) -AC_CONFIG_AUX_DIR([build-aux]) - -# Initialize Automake -AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip subdir-objects color-tests parallel-tests check-news]) -AM_MAINTAINER_MODE([enable]) - -# Get _GNU_SOURCE and friends -AC_USE_SYSTEM_EXTENSIONS - -# Initialize libtool -LT_INIT - -# Add xorg-macros stuff -m4_ifndef([XORG_MACROS_VERSION], - [m4_fatal([must install xorg-macros 1.16 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.16) -XORG_DEFAULT_OPTIONS -XORG_MEMORY_CHECK_FLAGS -XORG_ENABLE_DOCS -XORG_WITH_DOXYGEN - -# Needed in older Automakes for subdir-objects -AM_PROG_CC_C_O - -# Check for compiler features -AC_C_INLINE - -# Check for programs -AC_PROG_MKDIR_P -PKG_PROG_PKG_CONFIG - -# Note: we use some yacc extensions, which work with either GNU bison -# (preferred) or byacc. Other yacc's may or may not work. -AC_PROG_YACC -AC_PATH_PROG([YACC_INST], [$YACC]) -AS_IF([test ! -f "src/xkbcomp/parser.c" -a "x$YACC_INST" = x], [ - AC_MSG_ERROR([yacc not found - unable to compile src/xkbcomp/parser.y]) -]) - -# Checks for library functions. -AC_CHECK_FUNCS([eaccess euidaccess mmap mkostemp posix_fallocate]) - -AC_CHECK_FUNCS([secure_getenv __secure_getenv]) -AS_IF([test "x$ac_cv_func_secure_getenv" = xno -a \ - "x$ac_cv_func___secure_getenv" = xno], [ - AC_MSG_WARN([C library does not support secure_getenv, using getenv instead]) -]) - -AX_GCC_BUILTIN(__builtin_expect) - -# Some tests use Linux-specific headers -AC_CHECK_HEADER([linux/input.h]) -AM_CONDITIONAL(BUILD_LINUX_TESTS, [test "x$ac_cv_header_linux_input_h" = xyes]) - -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-fvisibility=hidden -fno-strict-aliasing -fsanitize-undefined-trap-on-error]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wextra -Wno-unused-parameter -Wno-missing-field-initializers]) -XORG_TESTSET_CFLAG([BASE_CFLAGS], [-Wdocumentation -Wno-documentation-deprecated-sync]) - -# OpenBSD does not have DT_NEEDED entries for libc by design -# so when these flags are passed to ld via libtool the checks will fail -case "$host_os" in -openbsd*) - ;; -*) - XORG_CHECK_LINKER_FLAGS([-Wl,--no-undefined], [have_no_undefined=yes]) ;; -esac -AM_CONDITIONAL([HAVE_NO_UNDEFINED], [test "x$have_no_undefined" = xyes]) - -XORG_CHECK_LINKER_FLAGS([-Wl,--version-script="$srcdir/xkbcommon.map"], [have_version_script=yes]) -AM_CONDITIONAL([HAVE_VERSION_SCRIPT], [test "x$have_version_script" = xyes]) - -# Define a configuration option for the XKB config root -xkb_base=`$PKG_CONFIG --variable=xkb_base xkeyboard-config` -AS_IF([test "x$xkb_base" = x], [ - xkb_base="$datadir/X11/xkb" -]) -AC_ARG_WITH([xkb_config_root], - [AS_HELP_STRING([--with-xkb-config-root=], - [Set default XKB config root (default: xkeyboard-config install path)])], - [XKBCONFIGROOT="$withval"], - [XKBCONFIGROOT="$xkb_base"]) -AC_SUBST([XKBCONFIGROOT]) - -# Define a configuration option for the X locale directory for compose -AC_ARG_WITH([x_locale_root], - [AS_HELP_STRING([--with-x-locale-root=], - [Set X locale root (default: $datadir/X11/locale)])], - [XLOCALEDIR="$withval"], - [XLOCALEDIR="$datadir/X11/locale"]) -AC_SUBST([XLOCALEDIR]) - -AC_ARG_WITH([default_rules], - [AS_HELP_STRING([--with-default-rules=], - [Default XKB ruleset (default: evdev)])], - [DEFAULT_XKB_RULES="$withval"], - [DEFAULT_XKB_RULES="evdev"]) -AC_DEFINE_UNQUOTED([DEFAULT_XKB_RULES], ["$DEFAULT_XKB_RULES"], - [Default XKB ruleset]) - -AC_ARG_WITH([default_model], - [AS_HELP_STRING([--with-default-model=], - [Default XKB model (default: pc105)])], - [DEFAULT_XKB_MODEL="$withval"], - [DEFAULT_XKB_MODEL="pc105"]) -AC_DEFINE_UNQUOTED([DEFAULT_XKB_MODEL], ["$DEFAULT_XKB_MODEL"], - [Default XKB model]) - -AC_ARG_WITH([default_layout], - [AS_HELP_STRING([--with-default-layout=], - [Default XKB layout (default: us)])], - [DEFAULT_XKB_LAYOUT="$withval"], - [DEFAULT_XKB_LAYOUT="us"]) -AC_DEFINE_UNQUOTED([DEFAULT_XKB_LAYOUT], ["$DEFAULT_XKB_LAYOUT"], - [Default XKB layout]) - -AC_ARG_WITH([default_variant], - [AS_HELP_STRING([--with-default-variant=], - [Default XKB variant (default: (none))])], - [DEFAULT_XKB_VARIANT="$withval"], - [DEFAULT_XKB_VARIANT=]) -AS_IF([test "x$DEFAULT_XKB_VARIANT" != x], [ - AC_DEFINE_UNQUOTED([DEFAULT_XKB_VARIANT], ["$DEFAULT_XKB_VARIANT"], - [Default XKB variant]) -]) - -AC_ARG_WITH([default_options], - [AS_HELP_STRING([--with-default-options=], - [Default XKB options (default: (none))])], - [DEFAULT_XKB_OPTIONS="$withval"], - [DEFAULT_XKB_OPTIONS=]) -AS_IF([test "x$DEFAULT_XKB_OPTIONS" != x], [ - AC_DEFINE_UNQUOTED([DEFAULT_XKB_OPTIONS], ["$DEFAULT_XKB_OPTIONS"], - [Default XKB options]) -]) - -AC_ARG_ENABLE([x11], - [AS_HELP_STRING([--disable-x11], - [Disable support for creating keymaps with the X11 protocol (default: enabled)])], - [], [enable_x11=yes]) -AS_IF([test "x$enable_x11" = xyes], [ - PKG_CHECK_MODULES([XCB_XKB], [xcb xcb-xkb >= 1.10], [], - [AC_MSG_ERROR([xkbcommon-x11 requires xcb-xkb >= 1.10 which was not found. \ -You can disable X11 support with --disable-x11.])]) -], [enable_x11=no]) -AM_CONDITIONAL([ENABLE_X11], [test "x$enable_x11" = xyes]) - -WAYLAND_PKGS="wayland-client >= 1.2.0 wayland-protocols >= 1.12 wayland-scanner" -AC_ARG_ENABLE([wayland], - [AS_HELP_STRING([--disable-wayland], - [Disable support for Wayland utility programs (default: auto)])], - [], [enable_wayland=auto]) -AS_IF([test "x$enable_wayland" = xauto], [ - PKG_CHECK_EXISTS($WAYLAND_PKGS, [enable_wayland=yes], [enable_wayland=no])], - []) -AS_IF([test "x$enable_wayland" = xyes], [ - PKG_CHECK_MODULES([WAYLAND], $WAYLAND_PKGS, [], - [AC_MSG_ERROR([Wayland utilities require libwayland-client >= 1.2 which was not found. \ -You can disable Wayland support with --disable-wayland.])]) - AC_PATH_PROG([wayland_scanner], [wayland-scanner]) - wayland_scanner=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner` - ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols` - AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir) -], [enable_wayland=no]) -AM_CONDITIONAL([ENABLE_WAYLAND], [test "x$enable_wayland" = xyes]) - -AC_CONFIG_FILES([ - Makefile - xkbcommon.pc - xkbcommon-x11.pc - doc/Doxyfile -]) -AC_OUTPUT - -AC_MSG_RESULT([ - $PACKAGE_NAME $VERSION - - libxkbcommon: yes - libxkbcommon-x11: ${enable_x11} - Wayland utilities: ${enable_wayland} - documentation: ${build_docs} - - default XKB rules: ${DEFAULT_XKB_RULES} - default XKB model: ${DEFAULT_XKB_MODEL} - default XKB layout: ${DEFAULT_XKB_LAYOUT} - default XKB variant: ${DEFAULT_XKB_VARIANT} - default XKB options: ${DEFAULT_XKB_OPTIONS} - - prefix: ${prefix} - includedir: ${includedir} - lib dir: ${libdir} - datarootdir: ${datarootdir} - XKB config root: ${XKBCONFIGROOT} - X11 locale root: ${XLOCALEDIR} -]) diff --git a/m4/ax_gcc_builtin.m4 b/m4/ax_gcc_builtin.m4 deleted file mode 100644 index b28a91b..0000000 --- a/m4/ax_gcc_builtin.m4 +++ /dev/null @@ -1,168 +0,0 @@ -# =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_gcc_builtin.html -# =========================================================================== -# -# SYNOPSIS -# -# AX_GCC_BUILTIN(BUILTIN) -# -# DESCRIPTION -# -# This macro checks if the compiler supports one of GCC's built-in -# functions; many other compilers also provide those same built-ins. -# -# The BUILTIN parameter is the name of the built-in function. -# -# If BUILTIN is supported define HAVE_. Keep in mind that since -# builtins usually start with two underscores they will be copied over -# into the HAVE_ definition (e.g. HAVE___BUILTIN_EXPECT for -# __builtin_expect()). -# -# The macro caches its result in the ax_cv_have_ variable (e.g. -# ax_cv_have___builtin_expect). -# -# The macro currently supports the following built-in functions: -# -# __builtin_assume_aligned -# __builtin_bswap32 -# __builtin_bswap64 -# __builtin_choose_expr -# __builtin___clear_cache -# __builtin_clrsb -# __builtin_clrsbl -# __builtin_clrsbll -# __builtin_clz -# __builtin_clzl -# __builtin_clzll -# __builtin_complex -# __builtin_constant_p -# __builtin_ctz -# __builtin_ctzl -# __builtin_ctzll -# __builtin_expect -# __builtin_ffs -# __builtin_ffsl -# __builtin_ffsll -# __builtin_fpclassify -# __builtin_huge_val -# __builtin_huge_valf -# __builtin_huge_vall -# __builtin_inf -# __builtin_infd128 -# __builtin_infd32 -# __builtin_infd64 -# __builtin_inff -# __builtin_infl -# __builtin_isinf_sign -# __builtin_nan -# __builtin_nand128 -# __builtin_nand32 -# __builtin_nand64 -# __builtin_nanf -# __builtin_nanl -# __builtin_nans -# __builtin_nansf -# __builtin_nansl -# __builtin_object_size -# __builtin_parity -# __builtin_parityl -# __builtin_parityll -# __builtin_popcount -# __builtin_popcountl -# __builtin_popcountll -# __builtin_powi -# __builtin_powif -# __builtin_powil -# __builtin_prefetch -# __builtin_trap -# __builtin_types_compatible_p -# __builtin_unreachable -# -# Unsuppored built-ins will be tested with an empty parameter set and the -# result of the check might be wrong or meaningless so use with care. -# -# LICENSE -# -# Copyright (c) 2013 Gabriele Svelto -# -# Copying and distribution of this file, with or without modification, are -# permitted in any medium without royalty provided the copyright notice -# and this notice are preserved. This file is offered as-is, without any -# warranty. - -#serial 2 - -AC_DEFUN([AX_GCC_BUILTIN], [ - AS_VAR_PUSHDEF([ac_var], [ax_cv_have_$1]) - - AC_CACHE_CHECK([for $1], [ac_var], [ - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [ - m4_case([$1], - [__builtin_assume_aligned], [$1("", 0)], - [__builtin_bswap32], [$1(0)], - [__builtin_bswap64], [$1(0)], - [__builtin_choose_expr], [$1(0, 0, 0)], - [__builtin___clear_cache], [$1("", "")], - [__builtin_clrsb], [$1(0)], - [__builtin_clrsbl], [$1(0)], - [__builtin_clrsbll], [$1(0)], - [__builtin_clz], [$1(0)], - [__builtin_clzl], [$1(0)], - [__builtin_clzll], [$1(0)], - [__builtin_complex], [$1(0.0, 0.0)], - [__builtin_constant_p], [$1(0)], - [__builtin_ctz], [$1(0)], - [__builtin_ctzl], [$1(0)], - [__builtin_ctzll], [$1(0)], - [__builtin_expect], [$1(0, 0)], - [__builtin_ffs], [$1(0)], - [__builtin_ffsl], [$1(0)], - [__builtin_ffsll], [$1(0)], - [__builtin_fpclassify], [$1(0, 1, 2, 3, 4, 0.0)], - [__builtin_huge_val], [$1()], - [__builtin_huge_valf], [$1()], - [__builtin_huge_vall], [$1()], - [__builtin_inf], [$1()], - [__builtin_infd128], [$1()], - [__builtin_infd32], [$1()], - [__builtin_infd64], [$1()], - [__builtin_inff], [$1()], - [__builtin_infl], [$1()], - [__builtin_isinf_sign], [$1(0.0)], - [__builtin_nan], [$1("")], - [__builtin_nand128], [$1("")], - [__builtin_nand32], [$1("")], - [__builtin_nand64], [$1("")], - [__builtin_nanf], [$1("")], - [__builtin_nanl], [$1("")], - [__builtin_nans], [$1("")], - [__builtin_nansf], [$1("")], - [__builtin_nansl], [$1("")], - [__builtin_object_size], [$1("", 0)], - [__builtin_parity], [$1(0)], - [__builtin_parityl], [$1(0)], - [__builtin_parityll], [$1(0)], - [__builtin_popcount], [$1(0)], - [__builtin_popcountl], [$1(0)], - [__builtin_popcountll], [$1(0)], - [__builtin_powi], [$1(0, 0)], - [__builtin_powif], [$1(0, 0)], - [__builtin_powil], [$1(0, 0)], - [__builtin_prefetch], [$1("")], - [__builtin_trap], [$1()], - [__builtin_types_compatible_p], [$1(int, int)], - [__builtin_unreachable], [$1()], - [m4_warn([syntax], [Unsupported built-in $1, the test may fail]) - $1()] - ) - ])], - [AS_VAR_SET([ac_var], [yes])], - [AS_VAR_SET([ac_var], [no])]) - ]) - - AS_IF([test yes = AS_VAR_GET([ac_var])], - [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$1), 1, - [Define to 1 if the system has the `$1' built-in function])], []) - - AS_VAR_POPDEF([ac_var]) -])