dnl -*- sh -*- dnl Process this file with autoconf to produce a configure script. # Initialize AC_INIT(kbdtools/loadkeys.y) define(ct_unicodedata_default,/usr/share/unidata/UnicodeData-2.txt) ct_localdatadir_default=/usr/local/share # iff --enable-localdatadir without specific dir #AC_CONFIG_AUX_DIR(autoconf) AC_CANONICAL_SYSTEM AM_INIT_AUTOMAKE(console-tools, 0.2.3) # Defaults AC_PREFIX_DEFAULT(/usr) # Header AM_CONFIG_HEADER(config.h) # Checks for programs. AM_PROG_LIBTOOL AM_PROG_LEX AC_PROG_YACC # i18n stuff ALL_LINGUAS="cs de ru da et_EE ga fr it" AM_GNU_GETTEXT AC_OUTPUT_COMMANDS([sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile]) AC_DEFINE_UNQUOTED(LOCALEDIR, "/usr/share/locale") # 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) # 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], [if test $enableval = yes then CFLAGS="$CFLAGS -O0 -Wall" else AC_DEFINE(NDEBUG) fi], [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 # #################### # Use UnicodeData if available AC_ARG_WITH([unicodedata], [ --with-unicodedata[=file] Use UnicodeData (default=]ct_unicodedata_default[)], [ case ${withval} in no) ;; yes) UNICODEDATA=]ct_unicodedata_default[ ;; *) UNICODEDATA=$withval ;; esac; ],[UNICODEDATA=]ct_unicodedata_default) if test ! -z "$UNICODEDATA" -a -r "$UNICODEDATA" then UNICODELISTS=unicodelists else UNICODELISTS= UNICODEDATA= fi AC_SUBST(UNICODEDATA) AC_SUBST(UNICODELISTS) # Allow local data dir, but not do that by default (not FSSTND-compliant ?) AC_ARG_ENABLE([localdatadir], [ --enable-localdatadir additional directory to search for data files [NONE]], [ case ${enableval} in no) ;; yes) ] AC_DEFINE_UNQUOTED(LOCALDATADIR, "$ct_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 VIDEOMODEDIR=videomodes AC_SUBST(TRANSDIR) AC_SUBST(FONTDIR) AC_SUBST(KEYMAPDIR) 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 po/Makefile.in intl/Makefile])