diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-04-20 03:22:19 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-04-20 03:22:19 +0000 |
commit | 05e06f7a7adc12d2e6200568164c38302bea8857 (patch) | |
tree | 4be43fe01046f56ac7418e30d75a1c94aff308bd /acinclude.m4 | |
parent | 342b03c228b8898c93cd0bcfeae9ee5e4d374d16 (diff) |
First cut at support for clang. We may want to have specific items for
"supports GCC-style -W flags", etc., and may want to improve the check
for "is this clang", as well as deciding what other stuff should be done
if we have clang as well. clang should, I think, largely be
gcc-compatible at the command line.
svn path=/trunk/; revision=36729
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 05829bf382..67eb67d937 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1689,6 +1689,8 @@ AC_DEFUN([AC_WIRESHARK_GEOIP_CHECK], # defined ldflags. The defined flags are added to LDFLAGS only if the # compilation succeeds. # +# XXX - clang as well? +# AC_DEFUN([AC_WIRESHARK_GCC_LDFLAGS_CHECK], [GCC_OPTION="$1" AC_MSG_CHECKING(whether we can add $GCC_OPTION to LDFLAGS) @@ -1716,14 +1718,14 @@ fi # # $1 : cflags to test # -# The macro first determines if the compiler is GCC. Then compile with the -# defined cflags. The defined flags are added to CFLAGS only if the compilation -# succeeds. +# The macro first determines if the compiler is GCC or clang. Then compile with +# the defined cflags. The defined flags are added to CFLAGS only if the +# compilation succeeds. # AC_DEFUN([AC_WIRESHARK_GCC_CFLAGS_CHECK], [GCC_OPTION="$1" AC_MSG_CHECKING(whether we can add $GCC_OPTION to CFLAGS) -if test "x$GCC" != "x"; then +if test "x$GCC" != "x" -o "x$CLANG" != "x" ; then CFLAGS_saved="$CFLAGS" CFLAGS="$CFLAGS $GCC_OPTION" AC_COMPILE_IFELSE([ |