diff options
-rw-r--r-- | configure.ac | 119 |
1 files changed, 6 insertions, 113 deletions
diff --git a/configure.ac b/configure.ac index bc3f1a0..bda7188 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -25,119 +25,12 @@ AC_PREREQ([2.62]) | |||
25 | AC_INIT([libxkbcommon], [0.3.1], | 25 | AC_INIT([libxkbcommon], [0.3.1], |
26 | [https://bugs.freedesktop.org/enter_bug.cgi?product=libxkbcommon], | 26 | [https://bugs.freedesktop.org/enter_bug.cgi?product=libxkbcommon], |
27 | [libxkbcommon], [http://xkbcommon.org]) | 27 | [libxkbcommon], [http://xkbcommon.org]) |
28 | AC_CONFIG_SRCDIR([Makefile.am]) | ||
29 | AC_CONFIG_HEADERS([src/config.h]) | ||
30 | AC_CONFIG_MACRO_DIR([m4]) | ||
31 | 28 | ||
32 | # Initialize Automake | 29 | AC_MSG_ERROR([xkbcommon has moved to GitHub. |
33 | AM_INIT_AUTOMAKE([foreign dist-xz no-dist-gzip subdir-objects color-tests parallel-tests]) | ||
34 | AM_MAINTAINER_MODE([enable]) | ||
35 | 30 | ||
36 | # Get _GNU_SOURCE and friends | 31 | Please update your checkout: |
37 | AC_USE_SYSTEM_EXTENSIONS | 32 | $ git remote set-url origin git://github.com/xkbcommon/libxkbcommon |
33 | $ git remote update | ||
34 | $ git reset --hard origin/master | ||
38 | 35 | ||
39 | # Initialize libtool | 36 | Thanks.]) |
40 | LT_INIT | ||
41 | |||
42 | # Add xorg-macros stuff | ||
43 | m4_ifndef([XORG_MACROS_VERSION], | ||
44 | [m4_fatal([must install xorg-macros 1.16 or later before running autoconf/autogen])]) | ||
45 | XORG_MACROS_VERSION(1.16) | ||
46 | XORG_DEFAULT_OPTIONS | ||
47 | XORG_MEMORY_CHECK_FLAGS | ||
48 | XORG_ENABLE_DOCS | ||
49 | XORG_WITH_DOXYGEN | ||
50 | |||
51 | # Check for compiler features | ||
52 | AC_C_INLINE | ||
53 | |||
54 | # Check for programs | ||
55 | AC_PROG_MKDIR_P | ||
56 | PKG_PROG_PKG_CONFIG | ||
57 | |||
58 | AC_PROG_YACC | ||
59 | AC_PATH_PROG([YACC_INST], $YACC) | ||
60 | if test ! -f "src/xkbcomp/parser.c"; then | ||
61 | if test -z "$YACC_INST"; then | ||
62 | AC_MSG_ERROR([yacc not found - unable to compile src/xkbcomp/parser.y]) | ||
63 | fi | ||
64 | fi | ||
65 | |||
66 | # Checks for library functions. | ||
67 | AC_CHECK_FUNCS([strcasecmp strncasecmp]) | ||
68 | if test "x$ac_cv_func_strcasecmp" = xno || \ | ||
69 | test "x$ac_cv_func_strncasecmp" = xno; then | ||
70 | AC_MSG_ERROR([C library does not support strcasecmp/strncasecmp]) | ||
71 | fi | ||
72 | |||
73 | AC_CHECK_FUNCS([eaccess euidaccess mmap]) | ||
74 | |||
75 | # Some tests use Linux-specific headers | ||
76 | AC_CHECK_HEADER([linux/input.h]) | ||
77 | AM_CONDITIONAL(BUILD_LINUX_TESTS, [test "x$ac_cv_header_linux_input_h" = xyes]) | ||
78 | |||
79 | XORG_TESTSET_CFLAG([BASE_CFLAGS], [-fvisibility=hidden]) | ||
80 | |||
81 | # Define a configuration option for the XKB config root | ||
82 | xkb_base=`$PKG_CONFIG --variable=xkb_base xkeyboard-config` | ||
83 | if test "x$xkb_base" = x; then | ||
84 | xkb_base=$datadir/X11/xkb | ||
85 | fi | ||
86 | AC_ARG_WITH([xkb_config_root], | ||
87 | [AS_HELP_STRING([--with-xkb-config-root=<path>], | ||
88 | [Set default XKB config root (default: xkeyboard-config install path)])], | ||
89 | [XKBCONFIGROOT="$withval"], | ||
90 | [XKBCONFIGROOT="$xkb_base"]) | ||
91 | AC_SUBST([XKBCONFIGROOT]) | ||
92 | |||
93 | AC_ARG_WITH([default_rules], | ||
94 | [AS_HELP_STRING([--with-default-rules=<path>], | ||
95 | [Default XKB ruleset (default: evdev)])], | ||
96 | [DEFAULT_XKB_RULES="$withval"], | ||
97 | [DEFAULT_XKB_RULES="evdev"]) | ||
98 | AC_DEFINE_UNQUOTED([DEFAULT_XKB_RULES], ["$DEFAULT_XKB_RULES"], | ||
99 | [Default XKB ruleset]) | ||
100 | |||
101 | AC_ARG_WITH([default_model], | ||
102 | [AS_HELP_STRING([--with-default-model=<path>], | ||
103 | [Default XKB model (default: pc105)])], | ||
104 | [DEFAULT_XKB_MODEL="$withval"], | ||
105 | [DEFAULT_XKB_MODEL="pc105"]) | ||
106 | AC_DEFINE_UNQUOTED([DEFAULT_XKB_MODEL], ["$DEFAULT_XKB_MODEL"], | ||
107 | [Default XKB model]) | ||
108 | |||
109 | AC_ARG_WITH([default_layout], | ||
110 | [AS_HELP_STRING([--with-default-layout=<path>], | ||
111 | [Default XKB layout (default: us)])], | ||
112 | [DEFAULT_XKB_LAYOUT="$withval"], | ||
113 | [DEFAULT_XKB_LAYOUT="us"]) | ||
114 | AC_DEFINE_UNQUOTED([DEFAULT_XKB_LAYOUT], ["$DEFAULT_XKB_LAYOUT"], | ||
115 | [Default XKB layout]) | ||
116 | |||
117 | AC_ARG_WITH([default_variant], | ||
118 | [AS_HELP_STRING([--with-default-variant=<path>], | ||
119 | [Default XKB variant (default: (none))])], | ||
120 | [DEFAULT_XKB_VARIANT="$withval"], | ||
121 | [DEFAULT_XKB_VARAINT=]) | ||
122 | if ! test "x$DEFAULT_XKB_VARIANT" = x; then | ||
123 | AC_DEFINE_UNQUOTED([DEFAULT_XKB_VARIANT], ["$DEFAULT_XKB_VARIANT"], | ||
124 | [Default XKB variant]) | ||
125 | fi | ||
126 | |||
127 | AC_ARG_WITH([default_options], | ||
128 | [AS_HELP_STRING([--with-default-options=<path>], | ||
129 | [Default XKB options (default: (none))])], | ||
130 | [DEFAULT_XKB_OPTIONS="$withval"], | ||
131 | [DEFAULT_XKB_OPTIONS=]) | ||
132 | if ! test "x$DEFAULT_XKB_OPTIONS" = x; then | ||
133 | AC_DEFINE_UNQUOTED([DEFAULT_XKB_OPTIONS], ["$DEFAULT_XKB_OPTIONS"], | ||
134 | [Default XKB options]) | ||
135 | fi | ||
136 | |||
137 | AC_CONFIG_FILES([ | ||
138 | Makefile | ||
139 | xkbcommon-uninstalled.pc | ||
140 | xkbcommon.pc | ||
141 | doc/Doxyfile | ||
142 | ]) | ||
143 | AC_OUTPUT | ||