[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_PROG_CC wrongly setting $GCC=yes while clang is used
From: |
Bastien Chevreux |
Subject: |
AC_PROG_CC wrongly setting $GCC=yes while clang is used |
Date: |
Sun, 7 Sep 2014 22:52:43 +0200 |
Hello there,
having used gcc for ages, I decided to try and play around with clang for one
of my C/C++ projects. Unfortunately, it looks as if autoconf 2.69 gets things
horribly wrong with clang.
I’m literally forcing it to find only clang, but it still insists on trying to
tell me I’m running a gcc. In my configure.ac I have:
…
AC_PROG_CC([clang])
echo "I have dollarGCC= $GCC"
exit
which results in the following output:
checking for clang... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking whether clang understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of clang... gcc3
I have dollarGCC= yes
I’m not sure how to continue from here. I looked at the config log, but only
see the following:
configure:3334: checking for clang
configure:3350: found /usr/bin/clang
configure:3361: result: clang
configure:3392: checking for C compiler version
configure:3401: clang --version >&5
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix
configure:3412: $? = 0
configure:3401: clang -v >&5
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix
configure:3412: $? = 0
configure:3401: clang -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:3412: $? = 1
configure:3401: clang -qversion >&5
clang: error: unknown argument: '-qversion'
[-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in
the future
clang: error: no input files
configure:3412: $? = 1
configure:3432: checking whether the C compiler works
configure:3454: clang -mmacosx-version-min=10.6 conftest.c >&5
configure:3458: $? = 0
configure:3506: result: yes
configure:3509: checking for C compiler default output file name
configure:3511: result: a.out
configure:3517: checking for suffix of executables
configure:3524: clang -o conftest -mmacosx-version-min=10.6 conftest.c
>&5
configure:3528: $? = 0
configure:3550: result:
configure:3572: checking whether we are cross compiling
configure:3580: clang -o conftest -mmacosx-version-min=10.6 conftest.c
>&5
configure:3584: $? = 0
configure:3591: ./conftest
configure:3595: $? = 0
configure:3610: result: no
configure:3615: checking for suffix of object files
configure:3637: clang -c -mmacosx-version-min=10.6 conftest.c >&5
configure:3641: $? = 0
configure:3662: result: o
configure:3666: checking whether we are using the GNU C compiler
configure:3685: clang -c -mmacosx-version-min=10.6 conftest.c >&5
configure:3685: $? = 0
configure:3694: result: yes
Am I doing something wrong and if yes, any idea how this can be fixed?
Best,
Bastien
- AC_PROG_CC wrongly setting $GCC=yes while clang is used,
Bastien Chevreux <=
- Re: AC_PROG_CC wrongly setting $GCC=yes while clang is used, Paul Smith, 2014/09/08
- Re: AC_PROG_CC wrongly setting $GCC=yes while clang is used, Thomas Jahns, 2014/09/08
- Re: AC_PROG_CC wrongly setting $GCC=yes while clang is used, Eric Blake, 2014/09/08
- Re: AC_PROG_CC wrongly setting $GCC=yes while clang is used, Paul Eggert, 2014/09/08
- Re: AC_PROG_CC wrongly setting $GCC=yes while clang is used, Marko Lindqvist, 2014/09/08
- Re: AC_PROG_CC wrongly setting $GCC=yes while clang is used, Paul Eggert, 2014/09/08
- Re: AC_PROG_CC wrongly setting $GCC=yes while clang is used, Bastien Chevreux, 2014/09/08
- Re: AC_PROG_CC wrongly setting $GCC=yes while clang is used, Paul Eggert, 2014/09/08
- Re: AC_PROG_CC wrongly setting $GCC=yes while clang is used, Bastien Chevreux, 2014/09/08
- Re: AC_PROG_CC wrongly setting $GCC=yes while clang is used, Marko Lindqvist, 2014/09/08