Commit 77d0ab6b authored by Mike Hibler's avatar Mike Hibler

Slightly better way to tell if assign is being built with clang.

parent f6193775
#
# Copyright (c) 2000-2010 University of Utah and the Flux Group.
# Copyright (c) 2000-2014 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -27,6 +27,7 @@ SUBDIR = assign
MAKEFILE_IN = @srcdir@/GNUmakefile.in
HAVE_XERCES = @HAVE_XERCES@
NEWER_BOOST = @NEWER_BOOST@
USING_CLANG = @USING_CLANG@
include $(OBJDIR)/Makeconf
......@@ -56,7 +57,7 @@ LIBS += -L/opt/local/lib
#
# If we are on FreeBSD 10 with clang, we need to use C++11 extensions:
#
ifneq ($(wildcard /usr/bin/clang),)
ifeq ($(USING_CLANG),yes)
CXXFLAGS += -Wno-c++11-extensions
endif
......
......@@ -610,6 +610,7 @@ INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
TESTMODE
USING_CLANG
NEWER_BOOST
HAVE_XERCES
CXXCPP
......@@ -6290,6 +6291,37 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
#
# Are we building with Clang?
# Taken from MesaLib configure via chromium.
#
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiling with clang" >&5
$as_echo_n "checking if compiling with clang... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
#ifndef __clang__
not clang
#endif
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
USING_CLANG=yes
else
USING_CLANG=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $USING_CLANG" >&5
$as_echo "$USING_CLANG" >&6; }
#
# Testing mode. In testing mode scripts should not effect hardware state.
# This is designed to be used with the testsuite software which operates
......@@ -6744,7 +6776,6 @@ outfiles="$outfiles Makeconf GNUmakefile \
protogeni/rspec-emulab/0.2/GNUmakefile \
protogeni/rspec-emulab/2/GNUmakefile \
apt/GNUmakefile \
collab/GNUmakefile \
collab/trac/GNUmakefile \
collab/plone/GNUmakefile \
collab/jabber/GNUmakefile \
......
......@@ -944,6 +944,21 @@ AC_LANG_RESTORE
AC_SUBST(HAVE_XERCES)
AC_SUBST(NEWER_BOOST)
#
# Are we building with Clang?
# Taken from MesaLib configure via chromium.
#
AC_MSG_CHECKING([if compiling with clang])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([], [[
#ifndef __clang__
not clang
#endif
]])],
[USING_CLANG=yes], [USING_CLANG=no])
AC_MSG_RESULT([$USING_CLANG])
AC_SUBST(USING_CLANG)
#
# Testing mode. In testing mode scripts should not effect hardware state.
# This is designed to be used with the testsuite software which operates
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment