Use XSL to generate man page from the rules XML
[xorg/xkeyboard-config] / configure.in
1 AC_INIT(xkeyboard-config, 2.3.99)
2 AC_CONFIG_SRCDIR(rules/base.xml.in)
3 AM_INIT_AUTOMAKE([foreign dist-bzip2])
4 AM_MAINTAINER_MODE
5
6 # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
7 m4_ifndef([XORG_MACROS_VERSION],
8           [m4_fatal([must install xorg-macros 1.8 or later before
9           running autoconf/autogen])])
10 XORG_MACROS_VERSION(1.8)
11 XORG_MANPAGE_SECTIONS
12
13 AC_SUBST(VERSION)
14
15 AC_PATH_PROG([XKBCOMP], [xkbcomp], [not_found])
16 if test x$XKBCOMP = xnot_found ; then
17         AC_ERROR([xkbcomp is required to install the xkb data files])
18 fi
19
20 AC_ARG_WITH( xkb_base,
21              [AS_HELP_STRING([--with-xkb-base=DIR],[XKB base path @<:@DATADIR/X11/xkb@:>@])],
22              xkb_base="$withval", 
23              xkb_base="${datadir}/X11/xkb" )
24
25 AC_ARG_WITH( xkb_rules_symlink,
26              [  --with-xkb-rules-symlink=NAME1(,NAME2)*        create symlink(s) to "old style" rules files (xfree86 and/or xorg)],
27              xkb_rules_symlink="$withval" )
28
29 AC_ARG_ENABLE( compat_rules,
30                [  --enable-compat-rules      create compatibility rules],
31                enable_compat_rules="$enableval",
32                enable_compat_rules="yes" )
33
34 AC_PATH_PROG(SED, [sed])
35 AC_PATH_PROG(XSLTPROC, [xsltproc])
36 AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"])
37 if test "x$XSLTPROC" = "x"; then
38     AC_MSG_WARN([xsltproc not found, needed to generate man page.])
39 fi
40
41 # xkeyboard-config does not have build-time dependencies. However, it does
42 # have run-time dependencies and keyboard layouts may not work without the
43 # right libX11 or xproto installed.
44 # By default, we enable these run-time dependencies as build-time
45 # dependencies so that those building on their local machines are warned
46 # that the resulting build may not work.
47 AC_ARG_ENABLE( runtime-deps,
48                [ --enable-runtime-deps    use run-time dependencies as build-time dependencies],
49                enable_runtime_deps="$enableval",
50                enable_runtime_deps="yes")
51
52 if test "x$enable_runtime_deps" = "xyes"; then
53     PKG_CHECK_MODULES(DEPS, [xproto >= 7.0.20] [x11 >= 1.4.3], [have_deps=yes], [have_deps=no])
54     if test "x$have_deps" = "xno" ; then
55         AC_MSG_WARN([
56                  Required dependencies not found. These dependencies are
57                  run-time dependencies only and not required for building.
58                  Skip this check with --disable-runtime-deps.
59
60                  Installing this version of xkeyboard-config on a host
61                  without the required dependencies may result in unusable
62                  keyboard layouts.
63                  ])
64
65         AC_MSG_ERROR([$DEPS_PKG_ERRORS])
66     fi
67 fi
68
69 AM_CONDITIONAL(CREATE_RULES_SYMLINK, test "x$xkb_rules_symlink" != "x")
70
71 AM_CONDITIONAL(USE_COMPAT_RULES, test "x$enable_compat_rules" = "xyes")
72
73 # ****
74 # i18n
75 # ****
76 AC_PROG_INTLTOOL(0.30)
77
78 GETTEXT_PACKAGE=xkeyboard-config
79 AC_SUBST(GETTEXT_PACKAGE)
80 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package])
81
82 AM_GLIB_GNU_GETTEXT
83
84 ALL_LINGUAS="af az bg ca crh cs da de el en_GB eo es fi fr gl hu id it ja ka ko ky lt nb nl pl ro ru rw sk sl sq sr sv tr uk vi zh_CN zh_TW"
85
86 AC_SUBST(xkb_base)
87 AC_SUBST(xkb_rules_symlink)
88
89 AC_OUTPUT([ po/Makefile.in
90 Makefile
91 compat/Makefile
92 geometry/Makefile
93 geometry/digital_vndr/Makefile
94 geometry/sgi_vndr/Makefile
95 keycodes/Makefile
96 keycodes/digital_vndr/Makefile
97 keycodes/sgi_vndr/Makefile
98 keymap/Makefile
99 keymap/digital_vndr/Makefile
100 keymap/sgi_vndr/Makefile
101 keymap/sun_vndr/Makefile
102 semantics/Makefile
103 rules/Makefile
104 rules/bin/Makefile
105 rules/compat/Makefile
106 symbols/Makefile
107 symbols/digital_vndr/Makefile
108 symbols/fujitsu_vndr/Makefile
109 symbols/hp_vndr/Makefile
110 symbols/macintosh_vndr/Makefile
111 symbols/nec_vndr/Makefile
112 symbols/nokia_vndr/Makefile
113 symbols/sgi_vndr/Makefile
114 symbols/sony_vndr/Makefile
115 symbols/sun_vndr/Makefile
116 symbols/xfree68_vndr/Makefile
117 types/Makefile
118 xkeyboard-config.pc
119 xkeyboard-config.spec
120 docs/Makefile
121 ])
122
123 echo '***********************************************************'
124 echo "  $PACKAGE_NAME is configured with the following parameters:"
125 echo "    XKB base directory: $xkb_base"
126 if test -z "$xkb_rules_symlink" ; then
127   echo "    Symbolic link(s) to legacy rules are not created"
128 else
129   echo "    Symbolic link(s) to legacy rules: $xkb_rules_symlink"
130 fi
131
132 if test "$enable_compat_rules" = "yes" ; then
133   echo "    Compatibility rules are included"
134 else
135   echo "    Compatibility rules are not included"
136 fi
137 echo '***********************************************************'
138