2015-05-01 07:18:12 -05:00
|
|
|
# Copyright (c) 2014-2015 Brent Cook
|
|
|
|
#
|
|
|
|
# Permission to use, copy, modify, and distribute this software for any
|
|
|
|
# purpose with or without fee is hereby granted, provided that the above
|
|
|
|
# copyright notice and this permission notice appear in all copies.
|
|
|
|
#
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
|
2022-02-27 06:05:41 -06:00
|
|
|
AC_INIT([libressl], m4_esyscmd(tr -d '\n' < VERSION))
|
2014-12-06 18:59:25 -06:00
|
|
|
AC_SUBST([LIBCRYPTO_VERSION], m4_esyscmd([tr -d '\n' < crypto/VERSION]))
|
|
|
|
AC_SUBST([LIBSSL_VERSION], m4_esyscmd([tr -d '\n' < ssl/VERSION]))
|
|
|
|
AC_SUBST([LIBTLS_VERSION], m4_esyscmd([tr -d '\n' < tls/VERSION]))
|
|
|
|
|
2014-07-17 21:20:34 -05:00
|
|
|
AC_CANONICAL_HOST
|
2015-06-13 22:31:26 -05:00
|
|
|
AM_INIT_AUTOMAKE([subdir-objects foreign])
|
2014-07-10 06:07:09 -05:00
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
|
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
|
|
|
2015-05-01 07:18:12 -05:00
|
|
|
# This must be saved before AC_PROG_CC
|
2015-04-19 14:55:25 -05:00
|
|
|
USER_CFLAGS="$CFLAGS"
|
|
|
|
|
2019-01-20 15:08:05 -06:00
|
|
|
AC_PROG_CC([cc gcc])
|
2015-03-22 06:03:43 -05:00
|
|
|
AM_PROG_CC_C_O
|
2020-08-20 09:30:21 -05:00
|
|
|
LT_INIT([pic-only])
|
2015-03-22 06:03:43 -05:00
|
|
|
|
2015-05-01 07:18:12 -05:00
|
|
|
CHECK_OS_OPTIONS
|
2015-01-05 20:31:34 -06:00
|
|
|
|
2015-05-01 07:18:12 -05:00
|
|
|
CHECK_C_HARDENING_OPTIONS
|
2015-01-05 20:31:34 -06:00
|
|
|
|
2015-05-01 07:18:12 -05:00
|
|
|
DISABLE_AS_EXECUTABLE_STACK
|
2015-04-14 22:12:52 -05:00
|
|
|
AM_PROG_AS
|
2014-12-21 23:14:02 -06:00
|
|
|
|
2015-05-01 07:18:12 -05:00
|
|
|
DISABLE_COMPILER_WARNINGS
|
2014-10-29 15:44:36 -05:00
|
|
|
|
2015-05-01 07:18:12 -05:00
|
|
|
# Check if the certhash command should be built
|
|
|
|
AC_CHECK_FUNCS([symlink])
|
2015-02-23 09:48:04 -06:00
|
|
|
AM_CONDITIONAL([BUILD_CERTHASH], [test "x$ac_cv_func_symlink" = xyes])
|
2014-07-21 07:50:32 -05:00
|
|
|
|
2015-05-01 07:18:12 -05:00
|
|
|
# Check if funopen exists
|
|
|
|
AC_CHECK_FUNC([funopen])
|
2014-07-30 06:53:02 -05:00
|
|
|
|
2015-05-01 07:18:12 -05:00
|
|
|
CHECK_LIBC_COMPAT
|
2015-10-07 08:55:05 -05:00
|
|
|
CHECK_SYSCALL_COMPAT
|
|
|
|
CHECK_CRYPTO_COMPAT
|
2015-05-01 07:18:12 -05:00
|
|
|
CHECK_VA_COPY
|
2015-10-01 07:40:26 -05:00
|
|
|
CHECK_B64_NTOP
|
2014-07-30 06:53:02 -05:00
|
|
|
|
2014-07-12 05:28:21 -05:00
|
|
|
AC_ARG_WITH([openssldir],
|
2014-12-06 18:43:58 -06:00
|
|
|
AS_HELP_STRING([--with-openssldir],
|
|
|
|
[Set the default openssl directory]),
|
2015-07-15 20:00:21 -05:00
|
|
|
OPENSSLDIR="$withval"
|
|
|
|
AC_SUBST(OPENSSLDIR)
|
2014-07-14 15:43:18 +02:00
|
|
|
)
|
2015-07-15 20:00:21 -05:00
|
|
|
AM_CONDITIONAL([OPENSSLDIR_DEFINED], [test x$with_openssldir != x])
|
2014-07-12 05:28:21 -05:00
|
|
|
|
2015-03-21 19:04:54 -05:00
|
|
|
AC_ARG_ENABLE([extratests],
|
|
|
|
AS_HELP_STRING([--enable-extratests], [Enable extra tests that may be unreliable on some platforms]))
|
|
|
|
AM_CONDITIONAL([ENABLE_EXTRATESTS], [test "x$enable_extratests" = xyes])
|
|
|
|
|
2020-05-01 13:07:11 +02:00
|
|
|
AC_ARG_ENABLE([tests],
|
2020-05-02 15:13:13 +02:00
|
|
|
[AS_HELP_STRING([--disable-tests], [Disable tests @<:@default=enabled@:>@])],
|
2020-05-01 21:03:06 +02:00
|
|
|
[
|
|
|
|
if ! test "x${enable_tests}" = "xyes"; then
|
|
|
|
enable_tests="no"
|
|
|
|
fi],
|
2020-05-02 14:35:34 +02:00
|
|
|
[enable_tests="yes"])
|
|
|
|
AM_CONDITIONAL([ENABLE_TESTS], [test "x$enable_tests" = xyes])
|
2020-05-01 13:07:11 +02:00
|
|
|
|
2017-07-08 17:46:16 -05:00
|
|
|
AS_CASE([$host_cpu],
|
2023-02-23 08:31:31 -06:00
|
|
|
[arm64], [host_cpu=aarch64],
|
2018-11-11 02:08:55 -06:00
|
|
|
[*arm*], [host_cpu=arm],
|
2018-05-02 22:30:34 -05:00
|
|
|
[*amd64*], [host_cpu=x86_64 HOSTARCH=intel],
|
2023-03-23 06:07:31 -05:00
|
|
|
[i?86], [host_cpu=i386 HOSTARCH=intel enable_asm=no],
|
|
|
|
[mips64*], [host_cpu=mips64 enable_asm=no],
|
|
|
|
[mips*], [host_cpu=mips enable_asm=no],
|
2023-02-14 02:52:10 -06:00
|
|
|
[powerpc*], [host_cpu=powerpc],
|
|
|
|
[ppc64*], [host_cpu=powerpc64],
|
2017-07-08 17:46:16 -05:00
|
|
|
[x86_64], [HOSTARCH=intel]
|
|
|
|
)
|
|
|
|
AM_CONDITIONAL([HOST_CPU_IS_INTEL], [test "x$HOSTARCH" = "xintel"])
|
2015-03-01 16:30:23 -06:00
|
|
|
|
2023-02-14 02:52:10 -06:00
|
|
|
AM_CONDITIONAL([HOST_AARCH64], [test "$host_cpu" = "aarch64"])
|
|
|
|
AM_CONDITIONAL([HOST_ARM], [test "$host_cpu" = "arm"])
|
|
|
|
AM_CONDITIONAL([HOST_I386], [test "$host_cpu" = "i386"])
|
|
|
|
AM_CONDITIONAL([HOST_MIPS], [test "$host_cpu" = "mips"])
|
|
|
|
AM_CONDITIONAL([HOST_MIPS64], [test "$host_cpu" = "mips64"])
|
|
|
|
AM_CONDITIONAL([HOST_POWERPC], [test "$host_cpu" = "powerpc"])
|
|
|
|
AM_CONDITIONAL([HOST_POWERPC64], [test "$host_cpu" = "ppc64"])
|
|
|
|
AM_CONDITIONAL([HOST_RISCV64], [test "$host_cpu" = "riscv64"])
|
|
|
|
AM_CONDITIONAL([HOST_SPARC64], [test "$host_cpu" = "sparc64"])
|
|
|
|
AM_CONDITIONAL([HOST_X86_64], [test "$host_cpu" = "x86_64"])
|
|
|
|
|
2015-07-17 16:54:23 -05:00
|
|
|
AC_MSG_CHECKING([if .gnu.warning accepts long strings])
|
|
|
|
AC_LINK_IFELSE([AC_LANG_SOURCE([[
|
|
|
|
extern void SSLv3_method();
|
2018-05-19 17:31:42 +01:00
|
|
|
__asm__(".section .gnu.warning.SSLv3_method\n\t.ascii \"SSLv3_method is insecure\"\n\t.text");
|
2015-07-17 16:54:23 -05:00
|
|
|
int main() {return 0;}
|
|
|
|
]])], [
|
|
|
|
AC_DEFINE(HAS_GNU_WARNING_LONG, 1, [Define if .gnu.warning accepts long strings.])
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
|
2023-03-23 06:07:31 -05:00
|
|
|
AC_ARG_ENABLE([asm], AS_HELP_STRING([--disable-asm], [Disable assembly]))
|
|
|
|
AM_CONDITIONAL([OPENSSL_NO_ASM], [test "x$enable_asm" = "xno"])
|
2015-05-01 07:18:12 -05:00
|
|
|
|
|
|
|
# Conditionally enable assembly by default
|
2018-11-11 02:08:55 -06:00
|
|
|
AM_CONDITIONAL([HOST_ASM_ELF_ARM],
|
|
|
|
[test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "arm" -a "x$enable_asm" != "xno"])
|
2023-03-23 06:07:31 -05:00
|
|
|
AM_CONDITIONAL([HOST_ASM_ELF_MIPS],
|
|
|
|
[test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "mips" -a "x$enable_asm" != "xno"])
|
|
|
|
AM_CONDITIONAL([HOST_ASM_ELF_MIPS64],
|
|
|
|
[test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "mips64" -a "x$enable_asm" != "xno"])
|
2014-12-06 18:43:58 -06:00
|
|
|
AM_CONDITIONAL([HOST_ASM_ELF_X86_64],
|
|
|
|
[test "x$HOST_ABI" = "xelf" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
|
|
|
|
AM_CONDITIONAL([HOST_ASM_MACOSX_X86_64],
|
2023-04-25 11:47:02 +02:00
|
|
|
[test "x$HOST_ABI" = "xmacosx" -a "$host_cpu" = "x86_64" -a "x$enable_asm" == "xenabled"])
|
2019-01-20 19:59:46 -06:00
|
|
|
AM_CONDITIONAL([HOST_ASM_MASM_X86_64],
|
|
|
|
[test "x$HOST_ABI" = "xmasm" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
|
|
|
|
AM_CONDITIONAL([HOST_ASM_MINGW64_X86_64],
|
|
|
|
[test "x$HOST_ABI" = "xmingw64" -a "$host_cpu" = "x86_64" -a "x$enable_asm" != "xno"])
|
2014-08-17 07:58:32 -05:00
|
|
|
|
2014-07-12 03:34:08 -05:00
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
|
|
|
include/Makefile
|
|
|
|
include/openssl/Makefile
|
|
|
|
crypto/Makefile
|
2014-12-04 22:37:22 -06:00
|
|
|
ssl/Makefile
|
|
|
|
tls/Makefile
|
2014-07-12 03:34:08 -05:00
|
|
|
tests/Makefile
|
|
|
|
apps/Makefile
|
2017-01-24 06:06:07 -06:00
|
|
|
apps/ocspcheck/Makefile
|
2015-09-12 07:48:06 -05:00
|
|
|
apps/openssl/Makefile
|
|
|
|
apps/nc/Makefile
|
2014-07-12 03:34:08 -05:00
|
|
|
man/Makefile
|
|
|
|
libcrypto.pc
|
|
|
|
libssl.pc
|
2015-03-18 19:12:42 -05:00
|
|
|
libtls.pc
|
2014-07-12 03:34:08 -05:00
|
|
|
openssl.pc
|
|
|
|
])
|
|
|
|
|
2021-04-05 02:32:35 -05:00
|
|
|
AC_ARG_ENABLE([nc],
|
|
|
|
AS_HELP_STRING([--enable-nc], [Enable installing TLS-enabled nc(1)]))
|
|
|
|
AM_CONDITIONAL([ENABLE_NC], [test "x$enable_nc" = xyes])
|
|
|
|
AM_CONDITIONAL([BUILD_NC], [test x$BUILD_NC = xyes -o "x$enable_nc" = xyes])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([libtls-only],
|
|
|
|
AS_HELP_STRING([--enable-libtls-only], [Enable installing libtls only]))
|
|
|
|
AM_CONDITIONAL([ENABLE_LIBTLS_ONLY], [test "x$enable_libtls_only" = xyes])
|
2015-10-17 23:32:21 -05:00
|
|
|
|
2015-10-18 10:36:31 -05:00
|
|
|
AC_REQUIRE_AUX_FILE([tap-driver.sh])
|
|
|
|
|
2014-07-12 03:34:08 -05:00
|
|
|
AC_OUTPUT
|