11

I know ./configure is an unix command, but I found a lot of source code which can be compiled on windows contain configure file but the command ".\configure" cannot run on cmd. A lot of tutorial wrote the compile steps like:

1.download and unzip the code

2.\configure

3.make

But the command ".\configure" cannot be recongnize by windows cmd. Could anyone please how to run this command on windows?

p.s. I have installed MinGW on my computer.

Community
  • 1
  • 1
maple
  • 1,828
  • 2
  • 19
  • 28

1 Answers1

7

Usually 'you do not run configure'.

If the source code you try to compile has those instructions, you might be lucky with some mingw build environment (e.g. msys or something more modern). Sometimes it works with Cygwin or inside Interix, but often it just adds to the troubles.

But if the README etc. does not mention Windows, you will probably not get very far that way, as usually some headers or libraries will be missing etc. A configure script is just a unix shell script, so it might call all kinds of unix tools or use unix shell features. Only a very limited set of those tools work on Windows, or make sense on windows.

So, it all depends on what you really want to build. For a lot of things there are portable buildsystems like CMake or special build instructions for Windows.

As you now mentioned, you want to compile CLANG, you surely do not want to use the configure step. See the clang/llvm documentation or the link mentioned by @Fruch (How to compile Clang on Windows) in the comments.

Community
  • 1
  • 1
schlenk
  • 7,002
  • 1
  • 25
  • 29