1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
|
dnl -*- sh -*-
dnl Process this file with autoconf to produce a configure script.
# Initialize
AC_INIT(kbdtools/loadkeys.c)
#AC_CONFIG_AUX_DIR(autoconf)
AM_INIT_AUTOMAKE(console-tools, 1998.08.11)
AC_CANONICAL_SYSTEM
# Defaults
AC_PREFIX_DEFAULT(/usr)
# Header
AM_CONFIG_HEADER(config.h)
# Checks for programs.
AM_PROG_LIBTOOL
AM_PROG_LEX
AC_PROG_YACC
# Turn around -rpath problem with libtool 1.0c
# This define should be improbable enough to not conflict with anything
case ${host} in
*-pc-linux-gnu)
AC_MSG_RESULT([Fixing libtool for -rpath problems.])
sed < libtool > libtool-2 \
's/^hardcode_libdir_flag_spec.*$/hardcode_libdir_flag_spec=" -D__FOO_132_BUZZ_191_BAR__ "/'
mv libtool-2 libtool
chmod 755 libtool
;;
esac
dnl loadkeys can only be built with both LEX and YACC:
if test ! -z "$LEX" -a ! -z "$YACC" ; then
LOADKEYS=loadkeys
else
AC_MSG_WARN([\`loadkeys\' will not be built, since it needs both LEX and YACC])
fi
AC_SUBST(LOADKEYS)
ct_CHECK_WITH_PROGS([main_compressor], [gzip lzop bzip2 compress])
case $ct_cv_prog_MAIN_COMPRESSOR in
gzip)
COMPRESSOR_OPTS="-9"
COMPRESSOR_EXT="gz"
;;
lzop)
COMPRESSOR_OPTS="-9"
COMPRESSOR_EXT="lzo"
;;
bzip2)
COMPRESSOR_OPTS="-9"
COMPRESSOR_EXT="bz2"
;;
compress)
COMPRESSOR_EXT="Z"
;;
*)
;;
esac
AC_SUBST(COMPRESSOR_OPTS)
AC_SUBST(COMPRESSOR_EXT)
# Checks for libraries.
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_STRUCT_TM dnl used
# Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(strspn strtol getline)
#
# Additional features
#
AC_ARG_ENABLE([debugging],
[ --enable-debugging do extra warnings, tests and comments],
[CFLAGS="$CFLAGS -Wall"],
[AC_DEFINE(NDEBUG)])
####################
#
EXTRAS=""
# TODO:
#
# Find the relevant test for "[gs]etkeycodes" => AC_SUBST(KEYCODES)
# was "! m68k && ! sparc"
#
AC_ARG_ENABLE([keycode-progs],
[ --disable-keycode-progs don't build keycodes-handling programs], ,
KEYCODES="getkeycodes setkeycodes" ; EXTRAS="${EXTRAS} ${KEYCODES}" )
AC_SUBST(KEYCODES)
# Enable `resizecons' only on i386 arch
case $target_cpu in
i?86)
RESIZECONS="resizecons"
;;
esac
AC_SUBST(RESIZECONS)
if test "$EXTRAS" != ""
then
AC_MSG_WARN([The following programs may not build on all archs: $EXTRAS.
Please send a build-log if it is the case, so that we can fix it.])
fi
#
####################
# Allow local data dir, but not do that by default (not FSSTND-compliant ?)
kb_localdatadir_default=/usr/local/share # iff --enable-localdatadir without specific dir
AC_ARG_ENABLE([localdatadir],
[ --enable-localdatadir additional directory to search for data files [NONE]],
[ case ${enableval} in
no) ;;
yes) ] AC_DEFINE_UNQUOTED(LOCALDATADIR, "$kb_localdatadir_default") [ ;;
*) ] AC_DEFINE_UNQUOTED(LOCALDATADIR, "$enableval") [ ;;
esac;
])
# Allow installing kbd-compat scripts
AC_ARG_ENABLE([kbd-compat],
[ --enable-kbd-compat install wrapper scripts for compatibility with kbd],
[case ${enable_kbd_compat} in
yes) COMPAT=compat ;;
no) COMPAT=nocompat ;;
esac],
[COMPAT=nocompat])
AC_SUBST(COMPAT)
# Additional defs to ensure consistency
TRANSDIR=consoletrans
FONTDIR=consolefonts
KEYMAPDIR=keymaps
OLDKEYMAPDIR=keytables
VIDEOMODEDIR=videomodes
AC_SUBST(TRANSDIR)
AC_SUBST(FONTDIR)
AC_SUBST(KEYMAPDIR)
AC_SUBST(OLDKEYMAPDIR)
AC_SUBST(VIDEOMODEDIR)
# Output
AC_OUTPUT([Makefile lib/Makefile fontfiletools/Makefile vttools/Makefile
kbdtools/Makefile screenfonttools/Makefile contrib/Makefile
include/Makefile include/lct/Makefile compat/Makefile
doc/Makefile doc/man/Makefile examples/Makefile data/Makefile data/Make.rules
data/consolefonts/Makefile data/consoletrans/Makefile
data/keymaps/Makefile])
|