Skip to content

Commit 1d88c26

Browse files
author
Bas Vodde
committed
Generated files
1 parent 3f77bad commit 1d88c26

File tree

2 files changed

+77
-19
lines changed

2 files changed

+77
-19
lines changed

aclocal.m4

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,46 @@ AC_PREREQ([2.50])dnl
108108
am_aux_dir=`cd $ac_aux_dir && pwd`
109109
])
110110

111+
# AM_COND_IF -*- Autoconf -*-
112+
113+
# Copyright (C) 2008 Free Software Foundation, Inc.
114+
#
115+
# This file is free software; the Free Software Foundation
116+
# gives unlimited permission to copy and/or distribute it,
117+
# with or without modifications, as long as this notice is preserved.
118+
119+
# serial 1
120+
121+
# _AM_COND_IF
122+
# _AM_COND_ELSE
123+
# _AM_COND_ENDIF
124+
# --------------
125+
# These macros are only used for tracing.
126+
m4_define([_AM_COND_IF])
127+
m4_define([_AM_COND_ELSE])
128+
m4_define([_AM_COND_ENDIF])
129+
130+
131+
# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE])
132+
# ---------------------------------------
133+
# If the shell condition matching COND is true, execute IF-TRUE,
134+
# otherwise execute IF-FALSE. Allow automake to learn about conditional
135+
# instantiating macros (the AC_CONFIG_FOOS).
136+
AC_DEFUN([AM_COND_IF],
137+
[m4_ifndef([_AM_COND_VALUE_$1],
138+
[m4_fatal([$0: no such condition "$1"])])dnl
139+
_AM_COND_IF([$1])dnl
140+
if _AM_COND_VALUE_$1; then
141+
m4_default([$2], [:])
142+
m4_ifval([$3],
143+
[_AM_COND_ELSE([$1])dnl
144+
else
145+
$3
146+
])dnl
147+
_AM_COND_ENDIF([$1])dnl
148+
fi[]dnl
149+
])
150+
111151
# AM_CONDITIONAL -*- Autoconf -*-
112152

113153
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008

configure

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,8 @@ GTEST_HOME
650650
GMOCK_HOME
651651
INCLUDE_CPPUTEST_EXT_FALSE
652652
INCLUDE_CPPUTEST_EXT_TRUE
653+
TEST_COMPILER_IS_CLANG_FALSE
654+
TEST_COMPILER_IS_CLANG_TRUE
653655
CPPUTEST_HAS_LCOV
654656
CPPUTEST_HAS_CLANG
655657
CPPUTEST_HAS_GCC
@@ -6211,32 +6213,44 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
62116213
ac_compiler_gnu=$ac_cv_c_compiler_gnu
62126214

62136215

6214-
#### Check whether some linker options are supported... ?
6215-
6216-
LDFLAGS=
6217-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether LD supports -Qunused-arguments" >&5
6218-
$as_echo_n "checking whether LD supports -Qunused-arguments... " >&6; }
6219-
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6220-
/* end confdefs.h. */
6216+
##### Linker checking.
6217+
#
6218+
# TBD!
6219+
# Things that need to be fixed!
6220+
#
6221+
# The below code is checking for the -Qunused-arguments which is a linker flag. However, it says gcc supports it, while in fact, it doesn't.
6222+
# As a workaround, we'll just check whether it is clang hardcoded, this is not in the automake spirit and will need to be fixed.
6223+
#
6224+
# LDFLAGS=
6225+
# AC_MSG_CHECKING([whether LD supports -Qunused-arguments])
6226+
# AC_LINK_IFELSE([AC_LANG_PROGRAM([])], [AC_MSG_RESULT([yes]); CPPUTEST_NO_UNUSED_ARGUMENT_WARNING+=" -Qunused-arguments" ], [AC_MSG_RESULT([no])])
6227+
# LDFLAGS="$saved_ldflags"
6228+
6229+
#if [ -z "`$CXX --version | grep LLVM`" ]
6230+
#then
6231+
# AC_MSG_RESULT([no])
6232+
#else
6233+
# AC_MSG_RESULT([yes])
6234+
#fi
62216235

6222-
int
6223-
main ()
6224-
{
6236+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether CXXLD supports -Qunused-arguments linker option" >&5
6237+
$as_echo_n "checking whether CXXLD supports -Qunused-arguments linker option... " >&6; }
6238+
OUTPUT_WHEN_CLANG_COMPILER=`${CXX} --version | grep clang`
6239+
if ! test -z "$OUTPUT_WHEN_CLANG_COMPILER"; then
6240+
TEST_COMPILER_IS_CLANG_TRUE=
6241+
TEST_COMPILER_IS_CLANG_FALSE='#'
6242+
else
6243+
TEST_COMPILER_IS_CLANG_TRUE='#'
6244+
TEST_COMPILER_IS_CLANG_FALSE=
6245+
fi
62256246

6226-
;
6227-
return 0;
6228-
}
6229-
_ACEOF
6230-
if ac_fn_c_try_link "$LINENO"; then :
6247+
if ! test -z "$OUTPUT_WHEN_CLANG_COMPILER"; then
62316248
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62326249
$as_echo "yes" >&6; }; CPPUTEST_NO_UNUSED_ARGUMENT_WARNING+=" -Qunused-arguments"
62336250
else
62346251
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6235-
$as_echo "no" >&6; }
6252+
$as_echo "no" >&6; }; CPPUTEST_NO_UNUSED_ARGUMENT_WARNING+=" "
62366253
fi
6237-
rm -f core conftest.err conftest.$ac_objext \
6238-
conftest$ac_exeext conftest.$ac_ext
6239-
LDFLAGS="$saved_ldflags"
62406254

62416255
# Different features
62426256
# Check whether --enable-std-c was given.
@@ -16890,6 +16904,10 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
1689016904
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
1689116905
Usually this means the macro was only invoked conditionally." "$LINENO" 5
1689216906
fi
16907+
if test -z "${TEST_COMPILER_IS_CLANG_TRUE}" && test -z "${TEST_COMPILER_IS_CLANG_FALSE}"; then
16908+
as_fn_error $? "conditional \"TEST_COMPILER_IS_CLANG\" was never defined.
16909+
Usually this means the macro was only invoked conditionally." "$LINENO" 5
16910+
fi
1689316911
if test -z "${INCLUDE_CPPUTEST_EXT_TRUE}" && test -z "${INCLUDE_CPPUTEST_EXT_FALSE}"; then
1689416912
as_fn_error $? "conditional \"INCLUDE_CPPUTEST_EXT\" was never defined.
1689516913
Usually this means the macro was only invoked conditionally." "$LINENO" 5

0 commit comments

Comments
 (0)