2 Star 0 Fork 0

mirrors_gnu/src-highlite

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
configure.ac 9.82 KB
一键复制 编辑 原始数据 按行查看 历史
Tom Tromey 提交于 2020-06-10 22:35 . Use std::shared_ptr
# Copyright (C) 1999-2009, 2023 Lorenzo Bettini <http://www.lorenzobettini.it>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
dnl Process this file with autoconf to produce a configure script.
AC_INIT([GNU source-highlight],[3.1.9])
# this is requested for the install-data-local of doxygen documentation
AC_PREREQ([2.71])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
dnl for automake
AC_CONFIG_HEADERS([config.h])
AC_CHECK_PROGS([MAKEINFO], makeinfo, [$MISSING makeinfo])
AM_INIT_AUTOMAKE
#shared library versioning
LIBRARY_VERSION=5:1:0
# | | |
# +------+ | +---+
# | | |
# current:revision:age
# | | |
# | | +- increment if interfaces have been added
# | | set to zero if interfaces have been removed
# | | or changed
# | +- increment if source code has changed
# | set to zero if current is incremented
# +- increment if interfaces have been added, removed or changed
AC_SUBST(LIBRARY_VERSION)
AC_DEFINE_UNQUOTED(LIBRARY_VERSION, "$LIBRARY_VERSION")
AC_SUBST(source_highlightdatadir)
AC_SUBST(source_highlightdocdir)
AC_SUBST(source_highlightlibdocdir)
AC_SUBST(source_highlightlibexampledir)
AC_SUBST(bash_completiondir)
source_highlightdatadir=$datadir/source-highlight
source_highlightdocdir=$docdir
source_highlightlibdocdir=$docdir/api
source_highlightlibexampledir=$docdir/examples
bash_completiondir=$sysconfdir/bash_completion.d
dnl the namespace and header directory
LIBRARY_NAMESPACE=srchilite
AC_SUBST(LIBRARY_NAMESPACE)
dnl Checks for C compiler.
AC_PROG_CC
dnl Use of GnuLib
gl_EARLY
dnl add options for non GNU compilers
AC_NONGNU_FLAGS
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_EXEEXT
dnl Checks for C++ compiler.
AC_PROG_CXX
# We require a C++11 compiler.
AX_CXX_COMPILE_STDCXX(11, , mandatory)
AC_LANG([C++])
AC_PROG_AWK
AC_PROG_INSTALL
LT_INIT
dnl test for --enable-warnings command line option
AC_ARG_ENABLE( warnings, [ --enable-warnings enable compiler warnings], AC_COMPILE_WARNINGS )
dnl check for Boost regular expression library
AX_BOOST_BASE([1.33.1])
AX_BOOST_REGEX
dnl test for ch-root feature
AC_SUBST(CHROOT_INPUT_DIR)
AC_ARG_ENABLE( input-chroot, [ --enable-input-chroot=DIR change the root input dir], if test $enableval = yes || test $enableval = no; then echo "configure: error: you must specify a path for --enable-input-chroot" 1>&2; exit 1; else CHROOT_INPUT_DIR=$enableval; fi, CHROOT_INPUT_DIR= )
AC_DEFINE_UNQUOTED(CHROOT_INPUT_DIR, "$CHROOT_INPUT_DIR")
dnl AC_ARG_ENABLE( bash-completion-dir,
dnl [ --bash-completion-dir=DIR specify directory for bash completion files
dnl @<:@default=/etc/bash_completion.d@:>@], if test $enableval = yes || test $enableval = no; then echo "configure: error: you must specify a path for --bash-completion-dir" 1>&2; exit 1; else BASH_COMPLETION_DIR=$enableval; fi, BASH_COMPLETION_DIR="/etc/bash_completion.d/" )
AC_ARG_WITH([bash-completion],
AS_HELP_STRING([--with-bash-completion@<:@=DIR@:>@], [install bash_completion conf file (default is yes) - it is possible to specify bash_completion's config file directory (default is SYSCONFDIR/bash_completion.d)]),
[
if test "$withval" = "no"; then
BASH_COMPLETION_DIR=""
elif test "$withval" = "yes"; then
BASH_COMPLETION_DIR=$sysconfdir/bash_completion.d
else
BASH_COMPLETION_DIR="$withval"
fi
],
[BASH_COMPLETION_DIR=$sysconfdir/bash_completion.d])
AC_SUBST(BASH_COMPLETION_DIR)
dnl for yacc or bison
AC_PROG_YACC
dnl for lex or flex
AC_PROG_LEX([noyywrap])
AC_CHECK_HEADERS(unistd.h)
# For gnulib.
AC_LANG_PUSH([C])
gl_INIT
AC_LANG_POP([C])
dnl needed by readtags.c
AC_TYPE_OFF_T
dnl this is only for developers who change src/cmdline.ggo file
dnl GNU gengetopt can be found at http://www.gnu.org/software/gengetopt
AC_PATH_PROGS(GENGETOPT, gengetopt)
AM_CONDITIONAL(NO_GENGETOPT, test -z "$ac_cv_path_GENGETOPT" )
dnl this is only for developers who use double dispatch
dnl doublecpp can be found at http://www.lorenzobettini.it/software/doublecpp
AC_PATH_PROGS(DOUBLECPP, doublecpp)
AM_CONDITIONAL(NO_DOUBLECPP, test -z "$ac_cv_path_DOUBLECPP" )
dnl this is for testing purpose and development
AC_PATH_PROGS(VALGRIND, valgrind)
dnl this is only for developers who use change command line options
AC_PATH_PROGS(HELP2MAN, help2man)
AM_CONDITIONAL(NO_HELP2MAN, test -z "$ac_cv_path_HELP2MAN" )
dnl this is for generating references
AC_PATH_PROGS(CTAGS, ctags exuberant-ctags)
if test -n "$ac_cv_path_CTAGS"; then
AC_CTAGS_FLAGS
AM_CONDITIONAL(NO_CTAGS, test "$ac_cv_ctags_flags" = "no" )
else
AM_CONDITIONAL(NO_CTAGS, test -z "$ac_cv_path_CTAGS" )
fi
# Check for doxygen program.
AC_ARG_WITH([doxygen],
[AS_HELP_STRING([--with-doxygen],
[build doxygen documentation for the api of the library])],
[AC_PROG_TRY_DOXYGEN],
[with_doxygen=check])
AM_CONDITIONAL([HAVE_DOXYGEN],[test -n "$DOXYGEN"])
dnl *******************
dnl added by me
dnl *******************
AC_PATH_PROGS(BASH_SHELL, bash sh)
dnl set some flags if it's bison
AC_SUBST(YFLAGS)dnl
YFLAGS="$YFLAGS -d"
AC_MSG_CHECKING( checking if it's bison )
if test "$ac_cv_prog_YACC" = "bison -y"; then
YFLAGS="$YFLAGS -o y.tab.c -l"
AC_MSG_RESULT( $ac_cv_prog_YACC )
else
YFLAGS="$YFLAGS -l"
AC_MSG_RESULT( no: it's $YACC )
fi
AC_PATH_PROGS(TAR, tar gtar)
AC_PATH_PROGS(TEXI2HTML, texi2html)
AH_TEMPLATE(CHROOT_INPUT_DIR)
AH_TEMPLATE(LIBRARY_VERSION)
dnl compute relative paths
dnl adl_COMPUTE_STANDARD_RELATIVE_PATHS
adl_COMPUTE_RELATIVE_PATHS([bindir:datadir:bin_to_data])
source_highlight_lang_dir="$bin_to_data/source-highlight"
adl_NORMALIZE_PATH([source_highlight_lang_dir], prefix)
source_highlight_absolute_lang_dir=$source_highlightdatadir
adl_NORMALIZE_PATH([source_highlight_absolute_lang_dir], prefix)
AC_DEFINE_UNQUOTED([RELATIVEDATADIR], ["$source_highlight_lang_dir"],
[Define to the source-highlight
data directory relative to installation path.])
AC_DEFINE_DIR([ABSOLUTEDATADIR], [datadir/source-highlight],
[Define to the source-highlight
data directory absolute to installation path.])
bash_completiondir="${BASH_COMPLETION_DIR}"
AM_CONDITIONAL(USE_BASH_COMPLETION, test "${BASH_COMPLETION_DIR}" != "")
AM_MAINTAINER_MODE
AC_CONFIG_FILES(
[
Makefile
source-highlight.pc
src-highlite.directive
m4/Makefile
gl/Makefile
src/Makefile
src/java2html
src/cpp2html
src/src-hilite-lesspipe.sh
src/source-highlight-esc.sh
doc/Makefile
lib/Makefile
lib/srchilite/Makefile
lib/srchilite/srchilite.doxyfile
lib/tests/Makefile
lib/examples/Makefile
lib/compat/Makefile
tests/Makefile
tests/output_dir/Makefile
source-highlight.spec])
AC_CONFIG_FILES([tests/valgrind_tests.sh], [chmod +x tests/valgrind_tests.sh])
AC_CONFIG_FILES([tests/valgrind_suppressions.sh], [chmod +x tests/valgrind_suppressions.sh])
AC_CONFIG_FILES([tests/valgrind_test.sh], [chmod +x tests/valgrind_test.sh])
AC_CONFIG_FILES([lib/tests/valgrind_test.sh], [chmod +x lib/tests/valgrind_test.sh])
AC_CONFIG_FILES([doc/shjs_css_transform.sh], [chmod +x doc/shjs_css_transform.sh])
AC_CONFIG_FILES([doc/gen_style_example.sh], [chmod +x doc/gen_style_example.sh])
AC_OUTPUT
if test "$ax_cv_boost_regex" = "yes"; then
if test -z "$BOOST_REGEX_LIB"; then
AC_MSG_ERROR([
ERROR! Boost::regex library is installed, but you
must specify the suffix with --with-boost-regex at configure
for instance, --with-boost-regex=boost_regex-gcc-1_31])
else
echo ""
echo "Good - your configure finished. Start make now"
echo ""
fi
else
AC_MSG_ERROR([
ERROR! Boost::regex library not installed.
Please install it (download at http://www.boost.org/)])
fi
echo "
These programs are NOT required, and
are useful only for source-highlight developers
Gengetopt.........: $GENGETOPT
Doublecpp.........: $DOUBLECPP
Valgrind..........: $VALGRIND
"
echo "
($PACKAGE_NAME) version $PACKAGE_VERSION
Prefix.........: $prefix
Using Boost....: $BOOST_REGEX_LIB
C++ Compiler...: $CXX $CXXFLAGS $CPPFLAGS
Linker.........: $LD $LDFLAGS $LIBS
Doxygen........: ${DOXYGEN:-NONE or not enabled}
Help2Man.......: ${HELP2MAN:-NONE}
Ctags..........: ${CTAGS:-NONE}
"
if test -z "$ac_cv_path_HELP2MAN"; then
AC_MSG_WARN([
help2man is not installed so the man page will not
be updated in case command line options are changed.
This is important for maintainers only, though.])
fi
if test -z "$ac_cv_path_CTAGS"; then
AC_MSG_WARN([
ctags is not installed so you won't be able to
generate references (--gen-references).
You can find it here http://ctags.sourceforge.net
])
else
if test "$ac_cv_ctags_flags" = "no"; then
AC_MSG_WARN([
The ctags you have on your system cannot be used by source-highlight
(make sure you have a ctags that support --excmd option, e.g.,
exuberant ctags, You can find it here http://ctags.sourceforge.net).
so you won't be able to generate references (--gen-references).
])
fi
fi
if test -z "$DOXYGEN"; then
echo "-----------------------------------------"
echo " No Doxygen program found - continuing"
echo " without Doxygen documentation support."
echo " (it must be enabled with --with-doxygen)"
echo "-----------------------------------------"
fi
if test "${BASH_COMPLETION_DIR}" != ""; then
echo "Good: you're using bash_completion! dir: $BASH_COMPLETION_DIR"
else
echo "you're not using bash_completion (I'm not installing its config file)."
BASH_COMPLETION_DIR=""
fi
echo ""
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_gnu/src-highlite.git
[email protected]:mirrors_gnu/src-highlite.git
mirrors_gnu
src-highlite
src-highlite
master

搜索帮助