2011-11-07 21:28:40 +00:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
|
|
|
AC_PREREQ([2.67])
|
2018-01-07 02:31:15 +00:00
|
|
|
|
|
|
|
# FIXME Temporary hack until the next release (we'll switch to plain numeric tags then)
|
2018-04-03 07:01:17 +00:00
|
|
|
# FIXME need to quote sed expression
|
2015-06-03 18:08:57 +00:00
|
|
|
AC_INIT(
|
|
|
|
[crosstool-NG],
|
2018-02-05 07:39:01 +00:00
|
|
|
[m4_esyscmd_s([git describe --always --dirty | sed s,^crosstool-ng-,,])],
|
2018-01-07 02:31:15 +00:00
|
|
|
[crossgcc@sourceware.org],
|
|
|
|
[crosstool-ng],
|
|
|
|
[http://crosstool-ng.org])
|
2011-11-07 21:28:40 +00:00
|
|
|
AC_CONFIG_AUX_DIR([scripts])
|
2018-01-07 02:31:15 +00:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
|
2018-04-03 07:01:17 +00:00
|
|
|
# FIXME try to use gnu strictness? Just add the missing files?
|
2018-02-24 03:05:41 +00:00
|
|
|
# Set automake defaults:
|
|
|
|
# - Tarballs are compressed with xz and bzip2
|
|
|
|
# - Object files are generated in a subdirectory (new default in automake)
|
|
|
|
# - Request new tar format (old, tar-v7, breaks on long paths we have)
|
|
|
|
AM_INIT_AUTOMAKE([-Wall -Werror foreign no-dist-gzip dist-xz dist-bzip2 subdir-objects tar-pax])
|
2018-01-30 06:47:26 +00:00
|
|
|
|
2018-04-03 07:01:17 +00:00
|
|
|
# Safety check per autoconf best practices
|
|
|
|
AC_CONFIG_SRCDIR([ct-ng.in])
|
|
|
|
|
2011-11-07 21:28:40 +00:00
|
|
|
#--------------------------------------------------------------------
|
|
|
|
# Allow dummy --{en,dis}able-{static,shared}
|
|
|
|
AC_ARG_ENABLE(
|
|
|
|
[local],
|
|
|
|
[AS_HELP_STRING(
|
|
|
|
[--enable-local],
|
2018-03-19 06:40:28 +00:00
|
|
|
[run ct-ng from the current directory; 'make install' unsupported])])
|
2011-11-07 21:28:40 +00:00
|
|
|
AC_SUBST([enable_local], [${enable_local:-no}])
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
|
2018-04-05 06:08:48 +00:00
|
|
|
AC_ARG_WITH([bash-completion],
|
2018-04-04 07:07:45 +00:00
|
|
|
[AS_HELP_STRING(
|
|
|
|
[--with-bash-completion],
|
2018-04-05 06:08:48 +00:00
|
|
|
[install bash(1) command completion; can specify a path where it will be installed])],
|
2018-04-04 07:07:45 +00:00
|
|
|
[],
|
2018-04-05 06:08:48 +00:00
|
|
|
[with_bash_completion=yes])
|
|
|
|
AS_IF([test "${with_bash_completion}" = "no"],
|
|
|
|
[BASH_COMPLETION_DIR=],
|
|
|
|
[test "${with_bash_completion}" != "yes"],
|
|
|
|
[BASH_COMPLETION_DIR="${with_bash_completion}"],
|
|
|
|
[BASH_COMPLETION_DIR='${datadir}/bash-completion/completions'])
|
|
|
|
AM_CONDITIONAL([INSTALL_BASH_COMPLETION], [test -n "${BASH_COMPLETION_DIR}"])
|
|
|
|
AC_SUBST([BASH_COMPLETION_DIR])
|
2011-11-07 21:28:40 +00:00
|
|
|
|
|
|
|
# Check for --build and --host...
|
|
|
|
AC_CANONICAL_BUILD
|
|
|
|
AC_CANONICAL_HOST
|
|
|
|
# ... but refuse --target
|
|
|
|
AS_IF([test -n "$target_alias"],
|
|
|
|
AC_MSG_ERROR([--target is not allowed]))
|
|
|
|
|
|
|
|
# Allow program name tranformation (--program-{prefix,suffix,transform-name})
|
|
|
|
AC_ARG_PROGRAM
|
|
|
|
|
2018-01-07 02:31:15 +00:00
|
|
|
AC_PROG_MKDIR_P
|
2018-01-07 07:16:33 +00:00
|
|
|
AC_PROG_LN_S
|
2018-01-07 02:31:15 +00:00
|
|
|
|
2018-02-17 18:37:18 +00:00
|
|
|
CTNG_PROG_INSTALL
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_WITH_DEPRECATED([grep], [GREP])
|
2017-02-27 04:42:32 +00:00
|
|
|
AC_ARG_VAR([GREP], [Specify the full path to GNU grep])
|
2017-03-09 01:06:46 +00:00
|
|
|
|
|
|
|
# This is not a typo! Prefer GNU grep on macOS if it is installed.
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_PATH_TOOL_REQ([GREP], [ggrep grep], [grep])
|
|
|
|
CTNG_PATH_TOOL_REQ([EGREP], [gegrep egrep], [egrep])
|
2012-01-16 23:37:59 +00:00
|
|
|
AC_PROG_GREP
|
2011-11-07 21:28:40 +00:00
|
|
|
AC_PROG_EGREP
|
2018-01-07 02:31:15 +00:00
|
|
|
|
|
|
|
# FIXME: ct-ng assumes this in many places...
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
AS_IF([test "$EGREP" != "$GREP -E"],
|
2012-01-16 23:37:59 +00:00
|
|
|
[AC_MSG_ERROR([egrep is not $GREP -E])])
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_PROG_VERSION_REQ_STRICT([SED],
|
2017-02-27 04:42:32 +00:00
|
|
|
[GNU sed >= 4.0],
|
|
|
|
[sed],
|
|
|
|
[gsed sed],
|
2017-02-27 17:20:12 +00:00
|
|
|
['GNU sed[^0-9]* [4-9]\.'])
|
2017-02-27 04:42:32 +00:00
|
|
|
AC_ARG_VAR([SED], [Specify the full path to GNU sed])
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
|
2018-01-07 07:16:33 +00:00
|
|
|
AC_CONFIG_HEADERS([config.h])
|
2011-11-07 21:28:40 +00:00
|
|
|
|
2017-01-31 17:31:10 +00:00
|
|
|
# Modern GCC/GDB releases require C++ support in the compiler
|
2011-11-07 21:28:40 +00:00
|
|
|
AC_PROG_CC
|
2017-01-31 17:31:10 +00:00
|
|
|
AC_PROG_CXX
|
2018-01-07 02:31:15 +00:00
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_LEX
|
|
|
|
AC_PROG_YACC
|
2017-01-31 17:31:10 +00:00
|
|
|
AS_IF([test -z "$CC" -o -z "$CXX"],
|
2011-11-07 21:28:40 +00:00
|
|
|
[AC_MSG_ERROR([no suitable compiler found])])
|
2012-07-17 19:42:32 +00:00
|
|
|
|
2017-01-13 01:35:35 +00:00
|
|
|
# Check to see if the compiler can link statically
|
|
|
|
AC_MSG_CHECKING([if $CC can static link])
|
|
|
|
echo "int main() {}" | ${CC} -static -o /dev/null -xc - > /dev/null 2>&1
|
2016-02-26 11:34:52 +00:00
|
|
|
static_test=$?
|
|
|
|
AS_IF([test $static_test -eq 0],
|
|
|
|
[static_link=y
|
|
|
|
AC_MSG_RESULT([yes])],
|
|
|
|
[test $static_test -ne 0],
|
|
|
|
[static_link=
|
|
|
|
AC_MSG_RESULT([no])])
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_SET_KCONFIG_OPTION([static_link])
|
2016-02-26 11:34:52 +00:00
|
|
|
|
2011-11-07 21:28:40 +00:00
|
|
|
AC_PROG_RANLIB
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_PATH_TOOL_REQ([OBJCOPY], [gobjcopy objcopy], [objcopy])
|
|
|
|
CTNG_PATH_TOOL_REQ([OBJDUMP], [gobjdump objdump], [objdump])
|
|
|
|
CTNG_PATH_TOOL_REQ([READELF], [greadelf readelf], [readelf])
|
|
|
|
|
|
|
|
CTNG_CHECK_PROGS_REQ([bison], [bison])
|
|
|
|
CTNG_CHECK_PROGS_REQ([flex], [flex])
|
|
|
|
CTNG_CHECK_PROGS_REQ([makeinfo], [makeinfo])
|
|
|
|
CTNG_CHECK_PROGS_REQ([cut], [cut])
|
|
|
|
CTNG_CHECK_PROGS_REQ([readlink], [readlink])
|
|
|
|
CTNG_CHECK_PROGS_REQ([tar], [tar])
|
|
|
|
CTNG_CHECK_PROGS_REQ([gzip], [gzip])
|
|
|
|
CTNG_CHECK_PROGS_REQ([bzip2], [bzip2])
|
|
|
|
CTNG_CHECK_PROGS_REQ([xz], [xz])
|
|
|
|
CTNG_CHECK_PROGS_REQ([help2man], [help2man])
|
2011-11-07 21:28:40 +00:00
|
|
|
|
2017-02-12 21:51:42 +00:00
|
|
|
# Not a fatal failure even if we have neither - the tarballs may
|
|
|
|
# be provided in a local directory.
|
|
|
|
AC_CHECK_PROGS([wget], [wget])
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_SET_KCONFIG_OPTION([wget])
|
2017-02-12 21:51:42 +00:00
|
|
|
AC_SUBST([wget])
|
|
|
|
|
|
|
|
AC_CHECK_PROGS([curl], [curl])
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_SET_KCONFIG_OPTION([curl])
|
2017-02-12 21:51:42 +00:00
|
|
|
AC_SUBST([curl])
|
|
|
|
|
2018-02-17 18:37:18 +00:00
|
|
|
CTNG_PROG_STAT
|
2017-02-12 21:51:42 +00:00
|
|
|
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_CPU_COUNT
|
2017-03-02 04:22:13 +00:00
|
|
|
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_PATH_TOOL_REQ([PATCH], [gpatch patch], [patch])
|
2011-11-07 21:28:40 +00:00
|
|
|
|
|
|
|
# We need a bash that is >= 3.1
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_PROG_VERSION_REQ_STRICT([BASH_SHELL],
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
[GNU bash >= 3.1],
|
|
|
|
[bash],
|
|
|
|
[bash],
|
|
|
|
['^GNU bash, version (3\.[1-9]|4)'])
|
2011-11-07 21:28:40 +00:00
|
|
|
|
2012-07-14 16:25:47 +00:00
|
|
|
# We need a awk that *is* GNU awk
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_PROG_VERSION_REQ_STRICT([AWK],
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
[GNU awk],
|
|
|
|
[awk],
|
|
|
|
[gawk awk],
|
|
|
|
['^GNU Awk '])
|
2012-07-14 16:25:47 +00:00
|
|
|
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
# FIXME This checks for tools at the time configure runs. If a tool is later updated
|
|
|
|
# to satisfy our version requirement, we still won't be able to see that. Or worse,
|
|
|
|
# downgraded/removed. We should check this and update configure.in options right
|
|
|
|
# before running kconfig. Our configure should only check for stuff needed to
|
|
|
|
# build/install crosstool-ng itself.
|
2011-11-07 21:28:40 +00:00
|
|
|
#----------------------------------------
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
# Check for GNU make (want 3.81 or above, but will accept as long as any make is found)
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_PROG_VERSION_REQ_ANY([MAKE],
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
[GNU make >= 3.81],
|
|
|
|
[make],
|
|
|
|
[gmake make],
|
|
|
|
['^GNU Make (3\.8[1-9]|3\.9[0-9]|[4-9]\.)'],
|
|
|
|
[make_3_81_or_newer])
|
2014-02-20 18:23:08 +00:00
|
|
|
|
2018-02-05 07:39:01 +00:00
|
|
|
# Check other companion tools that we may or may not build.
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_PROG_VERSION([LIBTOOL],
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
[GNU libtool >= 2.4],
|
|
|
|
[libtool],
|
|
|
|
[glibtool libtool],
|
2017-02-27 04:42:32 +00:00
|
|
|
['\(GNU libtool\) ([3-9]\.|2.[4-9]|2.[1-3][0-9])'],
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
[libtool_2_4_or_newer])
|
2011-11-07 21:28:40 +00:00
|
|
|
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_PROG_VERSION([LIBTOOLIZE],
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
[GNU libtoolize >= 2.4],
|
|
|
|
[libtoolize],
|
|
|
|
[glibtoolize libtoolize],
|
2017-02-27 04:42:32 +00:00
|
|
|
['\(GNU libtool\) ([3-9]\.|2.[4-9]|2.[1-3][0-9])'],
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
[libtoolize_2_4_or_newer])
|
2011-11-07 21:28:40 +00:00
|
|
|
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_PROG_VERSION([AUTOCONF],
|
2017-01-30 05:39:44 +00:00
|
|
|
[GNU autoconf >= 2.65],
|
2017-08-29 21:45:30 +00:00
|
|
|
[autoconf],
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
[autoconf],
|
2017-02-27 04:42:32 +00:00
|
|
|
['\(GNU Autoconf\) ([3-9]\.|2\.[7-9][0-9]|2\.6[5-9])'],
|
2018-02-05 07:39:01 +00:00
|
|
|
[autoconf_2_65_or_newer])
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_PROG_VERSION([AUTORECONF],
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
[GNU autoreconf >= 2.63],
|
|
|
|
[autoreconf],
|
|
|
|
[autoreconf],
|
2018-02-05 07:39:01 +00:00
|
|
|
['\(GNU Autoconf\) ([3-9]\.|2\.[7-9][0-9]|2\.6[5-9])'],
|
|
|
|
[autoreconf_2_65_or_newer])
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_PROG_VERSION([AUTOMAKE],
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
[GNU automake >= 1.15],
|
|
|
|
[automake],
|
|
|
|
[automake],
|
2017-02-27 04:42:32 +00:00
|
|
|
['\(GNU automake\) ([2-9]\.|1\.[2-9][0-9]|1\.1[5-9])'],
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
[automake_1_15_or_newer])
|
|
|
|
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_PROG_VERSION([M4],
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
[GNU m4 >= 1.4.12],
|
|
|
|
[m4],
|
|
|
|
[gm4 m4],
|
2017-02-27 04:42:32 +00:00
|
|
|
['\(GNU M4\) ([2-9]\.|1\.[5-9]|1\.[1-4][0-9]|1\.4\.[2-9][0-9]|1\.4\.1[2-9])'],
|
Rework configure logic wrt GNU autotools
Rather than requiring them of a certain version, detect if they are present
(and have sufficient version) and select an appropriate companion tool
otherwise. The reason is that, for example, most recent gettext requires
automake 1.15, but the newest available CentOS has 1.13. Hence, the option
to "upgrade your system" does not apply, and the warning comment above
the companion tools is rather scary.
With this approach, it will work out of the box - either by using the host's
tools, or by building them as needed. Note that the user can still change
the setting in the config.
While there, propagate the new version checking macro to awk/bash/host binutils,
and switch from --with-foo=xxx to officially blessed FOO=xxx: the latter
does not require checking for bogus values (i.e., --with-foo, --without-foo)
and AC_PROG_* macros recognize the corresponding settings without further
modifications. For now, I kept --with-foo=, if only to complain and steer
people to the new way. To be cleaned up after a release.
Signed-off-by: Alexey Neyman <stilor@att.net>
2017-01-27 05:05:17 +00:00
|
|
|
[gnu_m4_1_4_12_or_newer])
|
2011-11-07 21:28:40 +00:00
|
|
|
|
|
|
|
AC_SUBST([kconfig_options])
|
|
|
|
|
|
|
|
AC_CHECK_PROGS([cvs], [cvs])
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_SET_KCONFIG_OPTION([cvs])
|
2011-11-07 21:28:40 +00:00
|
|
|
|
|
|
|
AC_CHECK_PROGS([svn], [svn])
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_SET_KCONFIG_OPTION([svn])
|
2011-11-07 21:28:40 +00:00
|
|
|
|
2017-01-24 02:25:15 +00:00
|
|
|
AC_CHECK_PROGS([git], [git])
|
2018-01-07 02:31:15 +00:00
|
|
|
CTNG_SET_KCONFIG_OPTION([git])
|
2017-01-24 02:25:15 +00:00
|
|
|
|
2018-01-07 02:31:15 +00:00
|
|
|
# FIXME why checking if not using the result? We don't provide replacemant malloc/alloca/...
|
2011-11-07 21:28:40 +00:00
|
|
|
AC_C_INLINE
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_FUNC_MALLOC
|
|
|
|
AC_FUNC_REALLOC
|
|
|
|
AC_FUNC_ALLOCA
|
2012-01-14 17:22:06 +00:00
|
|
|
|
2018-01-07 07:16:33 +00:00
|
|
|
AM_GNU_GETTEXT([external])
|
2018-02-05 07:39:01 +00:00
|
|
|
AM_GNU_GETTEXT_VERSION([0.19.8])
|
2018-01-07 07:16:33 +00:00
|
|
|
|
|
|
|
# For now, curses are needed to build kconfig. We may support a command-line
|
|
|
|
# only configuration without curses later. For now, fail in configure but
|
|
|
|
# consider it ok in config.h.
|
|
|
|
AX_WITH_CURSES
|
|
|
|
AS_IF([test "x$ax_cv_curses" != "xyes" ], [AC_MSG_ERROR([curses library not found])])
|
|
|
|
AX_WITH_CURSES_PANEL
|
|
|
|
AS_IF([test "x$ax_cv_panel" != "xyes" ], [AC_MSG_ERROR([panel library not found])])
|
|
|
|
AX_WITH_CURSES_MENU
|
|
|
|
AS_IF([test "x$ax_cv_menu" != "xyes" ], [AC_MSG_ERROR([menu library not found])])
|
|
|
|
|
|
|
|
AH_BOTTOM([
|
|
|
|
/* Select the correct curses/menu/panel headers */
|
|
|
|
#if defined HAVE_NCURSESW_CURSES_H
|
|
|
|
# define CURSES_LOC <ncursesw/curses.h>
|
|
|
|
#elif defined HAVE_NCURSESW_H
|
|
|
|
# define CURSES_LOC <ncursesw.h>
|
|
|
|
#elif defined HAVE_NCURSES_CURSES_H
|
|
|
|
# define CURSES_LOC <ncurses/curses.h>
|
|
|
|
#elif defined HAVE_NCURSES_H
|
|
|
|
# define CURSES_LOC <ncurses.h>
|
|
|
|
#elif defined HAVE_CURSES_H
|
|
|
|
# define CURSES_LOC <curses.h>
|
|
|
|
#else
|
|
|
|
# /* not an error - maybe a configuration didn't need curses */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined HAVE_NCURSESW_PANEL_H
|
|
|
|
# define PANEL_LOC <ncursesw/panel.h>
|
|
|
|
#elif defined HAVE_NCURSES_PANEL_H
|
|
|
|
# define PANEL_LOC <ncurses/panel.h>
|
|
|
|
#elif defined HAVE_PANEL_H
|
|
|
|
# define PANEL_LOC <panel.h>
|
|
|
|
#else
|
|
|
|
# /* not an error */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined HAVE_NCURSESW_MENU_H
|
|
|
|
# define MENU_LOC <ncursesw/menu.h>
|
|
|
|
#elif defined HAVE_NCURSES_MENU_H
|
|
|
|
# define MENU_LOC <ncurses/menu.h>
|
|
|
|
#elif defined HAVE_MENU_H
|
|
|
|
# define MENU_LOC <menu.h>
|
|
|
|
#else
|
|
|
|
# /* not an error */
|
|
|
|
#endif
|
|
|
|
])
|
|
|
|
|
|
|
|
AX_BUILD_DATE_EPOCH(DATE, [%c])
|
2017-07-21 13:18:40 +00:00
|
|
|
AC_SUBST([DATE])
|
2011-11-07 21:28:40 +00:00
|
|
|
|
2018-04-03 07:01:17 +00:00
|
|
|
AM_CONDITIONAL([INSTALL_USER_MANUAL], [test ! -f "${srcdir}/docs/MANUAL_ONLINE"])
|
|
|
|
AC_MSG_CHECKING([if the manual needs to be installed])
|
|
|
|
AM_COND_IF([INSTALL_USER_MANUAL], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
|
|
|
|
|
|
|
|
# FIXME Retire? We don't want to debug a version that has been mislabeled by a user
|
2018-01-07 02:31:15 +00:00
|
|
|
# Decorate the version string per user-supplied version.sh, if any
|
2011-11-07 21:28:40 +00:00
|
|
|
AS_IF(
|
|
|
|
[test -f version.sh -a -x version.sh],
|
2018-01-07 02:31:15 +00:00
|
|
|
[PACKAGE_VERSION=$(./version.sh "${PACKAGE_VERSION}")])
|
2011-11-07 21:28:40 +00:00
|
|
|
|
2018-01-07 02:31:15 +00:00
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
2018-03-18 00:41:36 +00:00
|
|
|
paths.sh
|
2018-01-07 02:31:15 +00:00
|
|
|
kconfig/Makefile
|
|
|
|
config/configure.in
|
|
|
|
])
|
|
|
|
|
2011-11-07 21:28:40 +00:00
|
|
|
AC_OUTPUT
|