Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ src/tscore/ink_autoconf.h.in
include/tscore/ink_config.h
include/ts/apidefs.h
src/tscore/CompileParseRules
src/tscore/CompileParseRules.dSYM
src/tscore/ParseRulesCType
src/tscore/ParseRulesCTypeToLower
src/tscore/ParseRulesCTypeToUpper
Expand Down
76 changes: 76 additions & 0 deletions build/ax_cc_for_build.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# ===========================================================================
# https://www.gnu.org/software/autoconf-archive/ax_cc_for_build.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CC_FOR_BUILD
#
# DESCRIPTION
#
# Find a build-time compiler. Sets CC_FOR_BUILD and EXEEXT_FOR_BUILD.
#
# LICENSE
#
# Copyright (c) 2010 Reuben Thomas <rrt@sc3d.org>
# Copyright (c) 1999 Richard Henderson <rth@redhat.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.

#serial 3

dnl Get a default for CC_FOR_BUILD to put into Makefile.
AC_DEFUN([AX_CC_FOR_BUILD],
[# Put a plausible default for CC_FOR_BUILD in Makefile.
if test -z "$CC_FOR_BUILD"; then
CC_FOR_BUILD='$(CC)'
CXX_FOR_BUILD='$(CXX)'
fi
AC_SUBST(CC_FOR_BUILD)
AC_SUBST(CXX_FOR_BUILD)

# Also set EXEEXT_FOR_BUILD.
if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
[rm -f conftest*
echo 'int main () { return 0; }' > conftest.c
bfd_cv_build_exeext=
${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
*) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
rm -f conftest*
test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
EXEEXT_FOR_BUILD=""
test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
fi
AC_SUBST(EXEEXT_FOR_BUILD)])dnl
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for the trailing "dnl"?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 changes: 5 additions & 2 deletions build/crypto.m4
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,18 @@ dnl Check OpenSSL Version
dnl
AC_DEFUN([TS_CHECK_CRYPTO_VERSION], [
AC_MSG_CHECKING([OpenSSL version])
AC_RUN_IFELSE([AC_LANG_SOURCE([[
AC_RUN_IFELSE([AC_LANG_SOURCE(
[
#include <openssl/opensslv.h>
int main() {
if (OPENSSL_VERSION_NUMBER < 0x1000200fL) {
return 1;
}
return 0;
}
]])],[AC_MSG_RESULT([ok])],[AC_MSG_FAILURE([requires OpenSSL version 1.0.2 or greater])],[])
])],
[AC_MSG_RESULT([ok])], [AC_MSG_FAILURE([requires OpenSSL version 1.0.2 or greater])], [AC_MSG_RESULT([assuming ok])]
)
])

dnl
Expand Down
2 changes: 2 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,8 @@ AM_PROG_AS

AX_COMPILER_VENDOR

AX_CC_FOR_BUILD

CFLAGS="${_ts_saved_CFLAGS}"
CXXFLAGS="${_ts_saved_CXXFLAGS}"

Expand Down
2 changes: 1 addition & 1 deletion mgmt/api/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ libmgmtapilocal_la_LIBADD = \
libmgmtapi.la \
$(top_builddir)/src/tscore/libtscore.la

libtsmgmt_la_LDFLAGS = -no-undefined -version-info @TS_LIBTOOL_VERSION@
libtsmgmt_la_LDFLAGS = @AM_LDFLAGS@ -no-undefined -version-info @TS_LIBTOOL_VERSION@
libtsmgmt_la_LIBADD = @LIBOBJS@ \
libmgmtapi.la \
$(top_builddir)/src/tscore/libtscore.la \
Expand Down
7 changes: 6 additions & 1 deletion src/tscore/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ endif

TESTS_ENVIRONMENT = LSAN_OPTIONS=suppressions=$(abs_top_srcdir)/ci/asan_leak_suppression/unit_tests.txt

BUILT_SOURCES = ParseRules.cc

TESTS = $(check_PROGRAMS)

lib_LTLIBRARIES = libtscore.la
Expand All @@ -38,7 +40,7 @@ AM_CPPFLAGS += \
$(TS_INCLUDES) \
@YAMLCPP_INCLUDES@

libtscore_la_LDFLAGS = -no-undefined -version-info @TS_LIBTOOL_VERSION@ @YAMLCPP_LDFLAGS@
libtscore_la_LDFLAGS = @AM_LDFLAGS@ -no-undefined -version-info @TS_LIBTOOL_VERSION@ @YAMLCPP_LDFLAGS@
libtscore_la_LIBADD = \
$(top_builddir)/src/tscpp/util/libtscpputil.la \
@HWLOC_LIBS@ \
Expand Down Expand Up @@ -205,6 +207,9 @@ freelist_benchmark_SOURCES = unit_tests/freelist_benchmark.cc

CompileParseRules_SOURCES = CompileParseRules.cc

CompileParseRules$(BUILD_EXEEXT): $(CompileParseRules_OBJECTS)
$(CXX_FOR_BUILD) $(AM_CXXFLAGS) -I$(top_builddir)/include -I$(abs_top_srcdir)/include -o $@ $(abs_top_srcdir)/src/tscore/CompileParseRules.cc

clean-local:
rm -f ParseRulesCType ParseRulesCTypeToLower ParseRulesCTypeToUpper

Expand Down
2 changes: 1 addition & 1 deletion src/tscpp/util/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ lib_LTLIBRARIES = libtscpputil.la

AM_CPPFLAGS += -I$(abs_top_srcdir)/include

libtscpputil_la_LDFLAGS = -no-undefined -version-info @TS_LIBTOOL_VERSION@
libtscpputil_la_LDFLAGS = @AM_LDFLAGS@ -no-undefined -version-info @TS_LIBTOOL_VERSION@

libtscpputil_la_SOURCES = \
TextView.cc
Expand Down