RE: finding C compiler and preprocessor?

ghc -v Foo.hs will show you what C compiler GHC invokes S | -----Original Message----- | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell-users- | bounces@haskell.org] On Behalf Of David Roundy | Sent: 18 March 2004 14:05 | To: glasgow-haskell-users@haskell.org | Subject: finding C compiler and preprocessor? | | Hello, | | Is there any way to find out what C compiler and preprocessor are used by | ghc? | | I've run into problems with a windows user, since the ghc distribution | apparently uses a different compiler than the one that my configure script | finds, and so the configure script indicates that a certain header file is | found, but then the program fails to compile, since ghc doesn't find them. | :( The only other option that comes to mind would be to write autoconf | macros to check for header files and/or libraries using ghc, but that | sounds to me like a real pain. | | Alternatively, if I could tell ghc which compiler to use, that would work | as well, since autoconf is perfectly capable of identifying a working C | compiler. | | I've tried telling autoconf that ghc is my C compiler, but that fails when | the user provides a CFLAGS that isn't supported by ghc. One could get | around this by prepending -optc to all the CFLAGS (but I haven't figured | out how to do this in shell), but then there is still the trouble of trying | to convince ghc to preprocess a C file with the C preprocessor. :( | | Any suggestions would be welcome! | -- | David Roundy | http://www.abridgegame.org | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (1)
-
Simon Peyton-Jones