Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run ./configure on windows

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.

like image 859
maple Avatar asked Dec 21 '14 15:12

maple


People also ask

What is the configure command?

The 'configure' command is NOT a standard Linux/UNIX command. configure is a script that is generally provided with the source of most standardized type Linux packages and contains code that will "patch" and localize the source distribution so that it will compile and load on your local Linux system.

How do I run an EXE from Command Prompt?

Type "start [filename.exe]" into Command Prompt, replacing "filename" with the name of your selected file. Replace "[filename.exe]" with your program's name. This allows you to run your program from the file path.

How do I get to display settings in CMD?

To access the system settings via the Command Prompt, here's what you can do: Press Win + R to open the Run command dialog box. Type CMD and press Ctrl + Shift + Enter to open an elevated Command Prompt. Type ms-settings: and press Enter to open the Settings window.

How do I open Windows setup?

Boot your PC using some Windows installation media (USB, DVD, etc.) Then, to open CMD in Windows Setup, simultaneously press the Shift + F10 keys on your keyboard when the installation wizard shows up.


1 Answers

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.

like image 113
schlenk Avatar answered Sep 17 '22 16:09

schlenk