cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Detecting HP native C compiler on HP-UX

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 22 May 2015 23:50:07 +0200 (CEST)

On Fri, 22 May 2015, DmiTriy Fedchenko wrote:

> Daniel, the main thing is that in order to determine what kind of C
> compiler we are running, cURL is using C preprocessor.

Yes. But that's also the only way we know how to detect the HP cc compiler. If
you google around, you'll also see others doing the same thing, and as I
showed you the fairly extensive resource at predef.sf.net knows no other
defines to check for.

> HP-UX native C compiler has define __HP_cc but for my project which is
> depending of cURL I have to use native C preprocessor which do not emit this
> define and I think it make some sense.

It also makes your compiler appear as something else, and I would probably be
bound to agree that you're using a rather unusual compiler setup.

> May be it is better to force configure script to run C compiler in
> preprocessor mode or even better to run C compiler itself?

How would that help? If you're using another preprocessor it doesn't matter
how invoke it, it will still not set the symbols we look for.

__hpux is for example also defined by gcc on HPUX.

Can't you just have configure run and use the standard setup in order to
detect everything fine, and then you change the cpp the way you want it before
to invoke make and do the actual build?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2015-05-22