[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AC_PROG_CPP was called before AC_PROG_CC
From: |
Paul Martinolich |
Subject: |
AC_PROG_CPP was called before AC_PROG_CC |
Date: |
Thu, 2 Nov 2000 12:49:57 -0600 |
With this configure.in, I get the same warning twice.
$ cat configure.in
AC_INIT(aps,2.4,address@hidden)
AC_PROG_CPP
AC_PROG_CC(cc gcc)
AC_CHECK_FUNCS(sincos)
AC_OUTPUT
$ autoconf
configure.in:3: warning: AC_PROG_CPP was called before AC_PROG_CC
configure.in:4: warning: AC_PROG_CPP was called before AC_PROG_CC
If I move AC_PROG_CPP below AC_PROG_CC I get the second warning.
This must be due to the AC_CHECK_FUNCS? Then, if I put AC_PROG_CPP
below that I don't get any warnings. If the second warning had
said:
configure.in:4: warning: AC_PROG_CPP was called before AC_CHECK_FUNCS
I would have know to move it to the bottom. Or, the problem may
be that some flag is not being set properly to say that AC_PROG_CC
was previously called (as a requirement of AC_CHECK_FUNCS?). And
in fact, even though I have AC_PROG_CC once, it is checked for
twice!
$ ./configure
checking for cc... cc
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking whether we are using the GNU C compiler... no
checking for object suffix... o
checking for executable suffix...
checking whether cc accepts -g... yes
checking how to run the C preprocessor... cc -E
checking for gcc... (cached) cc
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking whether we are using the GNU C compiler... (cached) no
checking whether cc accepts -g... (cached) yes
checking for sincos... no
creating ./config.status
(this is from the configure.in which as the CPP macro between the CC
and CHECK macros). It appears that AC_CHECK_FUNCS is rerunning the
AC_PROG_CC even though I have already included the test. In fact,
the following configure.in files runs the tests as I would have expected
(except that I want to change the default order of compilers).
$ cat configure.in
AC_INIT(aps,2.4,address@hidden)
AC_CHECK_FUNCS(sincos)
AC_OUTPUT
$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking whether we are using the GNU C compiler... yes
checking for object suffix... o
checking for executable suffix...
checking whether gcc accepts -g... yes
checking for sincos... no
creating ./config.status
(In fact, I am not sure I really need PROG_CPP in my actual case, as I
don't specifically use CPP as a compiler. But, it seems it was a
requirement at one time -- perhaps by automake -- I don't remember.)
Paul
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- AC_PROG_CPP was called before AC_PROG_CC,
Paul Martinolich <=