By checking http://wiki.openttd.org/Compiling_on_Windows_using_MinGW,

I realized that you should first start your msys.bat at ${MinGW_PATH}\msys\1.0\msys.bat( mine is C:\MinGW\msys\1.0\msys.bat ).

There you can then do whatever you likes to do.

./configure
make
make install
...
Answer from langdead on Stack Overflow
🌐
Super User
superuser.com › questions › 1639665 › i-cant-run-configure-script-in-windows-command-prompt
I can't run configure script in windows command prompt - Super User
April 6, 2021 - configure script is Linux and not Windows. Windows Subsystem for Linux can do this no probs but Windows doesn't interpret configure scripts like this without some help. If you look inside of the script, you can see that it is done with bash ...
Discussions

Thread: [Mingw-msys] ./configure | MinGW - Minimalist GNU for Windows
Join/Login · Business Software · Open Source Software · For Vendors · About · Articles · Create · SourceForge Podcast · Site Documentation · Subscribe to our Newsletter More on sourceforge.net
🌐 sourceforge.net
cmd - How to run ./configure on windows - Stack Overflow
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 More on stackoverflow.com
🌐 stackoverflow.com
compiling - Can not run configure command: "No such file or directory" - Unix & Linux Stack Exchange
I'm trying to install a Debian package from source (via git). I downloaded the package, changed to the package’s directory and ran ./configure command but it returned bash: ./configure: No such fil... More on unix.stackexchange.com
🌐 unix.stackexchange.com
October 2, 2014
bash - "Command not found" errors in configure script how to diagnose? - Stack Overflow
The errors seem to indicate a problem with command execution or syntax in the script. I'm not sure if this is due to a missing tool, an environment issue, or a syntax error in the script. ... OS and version: Windows 10 Version 22H2 running Ubuntu 22.04.3 LTS on Windows Subsystem for Linux (WSL2) ... Any guidance or suggestions would be greatly appreciated. P.S.1. AS suggested in the comments, I sandwiched the code block from the configure ... More on stackoverflow.com
🌐 stackoverflow.com
Top answer
1 of 4
12

If a software project is set up to be built using autoconf, that tool generates a script canonically called configure. It queries the system for various parameters that are subsequently used in the build, and is specific to the software package to be built. Different software projects have different configure scripts. They are all called configure, but their contents are not the same.

So, to actually build such a software project once that script was set up (usually done by the maintainers when packaging the source tarball for distribution), you call:

tar xzf <tarball>.gz   # or xjf <tarball>.bz2 or whatever
cd <sourcedir>         # the one you just untarred
./configure
make
make install

Note the prefix ./, which means "located in this directory" (i.e. the top directory of that project's source tree).

Actually, the better procedure is the so-called "out-of-tree build", when you set up a different directory for the binaries to be built in, so the source tree remains unmodified:

tar xzf <tarball>.gz     # or xjf <tarball>.bz2 or whatever
mkdir builddir
cd builddir
../<sourcedir>/configure
make
make install

So, there is supposed to be no configure executable in your PATH, you are supposed to call the script of that name from the source tree you are trying to build from.

2 of 4
7

If I correctly understood...

Configure is not an application that should be installed on your system, but script that should be delivered with source code to prepare for make command. File named configure should be in the main directory of source code.

🌐
SourceForge
sourceforge.net › home › browse › mingw - minimalist gnu for windows › mailing lists
Thread: [Mingw-msys] ./configure | MinGW - Minimalist GNU for Windows
Join/Login · Business Software · Open Source Software · For Vendors · About · Articles · Create · SourceForge Podcast · Site Documentation · Subscribe to our Newsletter
🌐
LinuxQuestions.org
linuxquestions.org › questions › linux-newbie-8 › can't-install-a-program-the-'configure'-command-is-not-found-481370
can't install a program -- the 'configure' command is not found
September 7, 2006 - Hi All, I'm trying to install ABC, which is a program I currently use on Windows. I downloaded the necessary files and when I type './configure' on my
Find elsewhere
Top answer
1 of 1
3

All those error messages are generated by the shell code in configure which AC_OUTPUT expands to.

There is nothing you can get wrong about writing AC_OUTPUT on a line by itself, so there is something wrong in the macros which happen before AC_OUTPUT and which set up things for AC_OUTPUT, both in the sh and in the m4 realm.

As a general remark, the configure.ac uses an uncommon sequence of events, and is a bit weird in other ways as well.

The specific weirdness which breaks things for you turns out to be the multiple lines in configure.ac which contain LT_INIT, some of which have the win32-dll argument some do not: The LT_INIT macro is only expanded into shell code the first time it appears in configure.ac and all subsequent LT_INIT macro invocations are substituted by no shell code at all.

So unless the first LT_INIT in the first case branch runs, no libtool related shell variables will be set, and the libtool shell code produced by AC_OUTPUT which relies on those variables will fail.

The fix on your side is easy: Just put one LT_INIT([win32-dll]) inside configure.ac, outside of all if or case conditionals.

On libtool's side, they could have LT_INIT produce an autoreconf time error message instead of expanding LT_INIT to an empty string, but that does not help you right now.

Here is OP's github issue for this question, and my github pull request with a fix.

How did I find this?

  • I put a bunch of echo AAAAAAAAAAAAAA and echo BBBBBBBBBBB lines into multiple places in configure.ac. The problem happened after the line which I put just before AC_OUTPUT and before the line which I put after AC_OUTPUT.

  • I restored configure.ac using git and I commented out AC_OUTPUT by adding dnl at the beginning of the AC_OUTPUT line. That confirmed the location where the problem occurred.

  • I restored configure.ac using git and commented out just about everything after AC_CANONICAL_HOST and before AC_OUTPUT with the exception of the AM_CONDITIONAL lines. This got rid of the problem.

  • I then successively uncommented those lines in logically cohesive chunks of a few dozen lines until the problem reappeared. The problem reappeared once I uncommented the case $build in ... esac which deals with defining some variables like SHAREDEXT and SHARED_LDFLAGS and SEP and WIN32, AC_DEFINEs the WIN32 macro, and expands the LT_INIT macro.

  • I restored configure.ac using git and commented out all the LT_INIT lines, putting just one LT_INIT([win32-dll]) line just before the above mentioned case $build in ... esac to reconfirm.

  • I checked m4/libtool.m4 and looked for the implementation of LT_INIT. As it turns out, when m4 expands LT_INIT for the first time, it redefines the LT_INIT macro to expand to nothing.

🌐
GitHub
github.com › ariya › phantomjs › issues › 14844
'configure.exe' is not recognized as an internal or external command, operable program or batch file. · Issue #14844 · ariya/phantomjs
February 23, 2017 - 'configure.exe' is not recognized as an internal or external command, operable program or batch file. building Qt Base, please wait... Executing in G:\Sources\phantomjs\src\qt\qtbase: nmake /NOLOGO NMAKE : fatal error U1064: MAKEFILE not found and no target specified Stop.
Author   ariya
🌐
GitHub
github.com › RTimothyEdwards › irsim › issues › 2
./configure $'\r': command not found · Issue #2 · RTimothyEdwards/irsim
March 30, 2021 - Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. ... I've tried for hours now. I cant get it to work, or am I missing something? some extra lib?
Author   RTimothyEdwards
🌐
Unix.com
unix.com › unix for beginners q & a › unix for dummies questions & answers
./configure: not found - UNIX for Dummies Questions & Answers - Unix Linux Community
October 19, 2017 - Hi, I’m trying to install sudo on Solaris 10. I have added the package. The notes said to use “./configure”, “./make” and “./make install” to complete the installation. However, none of the commands are found. Can you …
🌐
Gentoo Forums
forums.gentoo.org › board index › assistance › portage & programming
bash: configure: command not found - Gentoo Forums
The configure file is simply not there. If you are able to you are best finding a walkthrough to install the package. Could try ... are you trying to compile sources for firefox...or did you d/l the precompiled tarball from mozilla? ls should show whether you have a configure script in the ...
🌐
Reddit
reddit.com › r/cpp_questions › error in configure “command not found”, installing dependencies with configure.ac
r/cpp_questions on Reddit: error in configure “command not found”, installing dependencies with configure.ac
May 26, 2018 -

I'm installing a C library dependency using configure.ac. Here's the branch in question, named "subtrees":

https://github.com/mskilab/bambi/tree/subtrees

This is to be installed with cmake:

# Minimum of autoconfg 2.69
AC_PREREQ(2.69)

AC_INIT([my_library], [0.0.1])

AC_LANG(C++)
AC_REQUIRE_CPP
AC_PROG_CXX
AC_GNU_SOURCE
AC_SUBST([PKG_CXXFLAGS],["-std=c++11"])

base_dir=$(pwd)

## install https://github.com/madler/zlib
AC_MSG_NOTICE([begin build])
$(
    cd "src/zlib"; \
    mkdir -p "build"; \
    cd "build"; \
    cmake .. ; \
    make;
)

AC_MSG_NOTICE([build finished])

I run autoreconf -f to get a configure file. Upon installation, I get the following error:

configure: begin build
./configure: line 3212: --: command not found
configure: build finished

Heree are the exact lines sed -ne '3205,3220p' configure:

$as_echo "$as_me: Building zlib library" >&6;}
$(
    cd "src/zlib"; \
    mkdir -p "build"; \
    cd "build"; \
    cmake .. ; \
    make;
)

{ $as_echo "$as_me:${as_lineno-$LINENO}: zlib build complete" >&5
$as_echo "$as_me: zlib build complete" >&6;}



{ $as_echo "$as_me:${as_lineno-$LINENO}: Building ck library" >&5
$as_echo "$as_me: Building ck library" >&6;}

I'm confused how to de-bug ./configure: line 3212: --: command not found in this case. The source code in question in is /src.

(1) What does this error mean?

(2) How could I go about debugging this?

🌐
nixCraft
cyberciti.biz › nixcraft › howto › freebsd › linux / unix: command not found error and solution
Linux / UNIX: Command Not Found Error and Solution - nixCraft
October 28, 2020 - I was getting the same error mentioned here – } ./test_script.sh ./test_script.sh: Command not found. After looking at the initial things I was like “Doh!” and I checked the Notepad++ -> Edit Menu -> EOL Converstion settings and of course it was set to Windows and not UNIX.
🌐
Pluralsight
pluralsight.com › blog › cloud
Troubleshooting ./configure, make and make install Tutorial | Pluralsight
(configure:) (error:) no acceptable cc found in <somedirectories> Your gcc installation is either missing or the CC environment variable is not set. Check if the package gcc is installed, using your distro's package manager. If it isn't, install it. If it is installed, however, try using this command:
🌐
DaniWeb
daniweb.com › hardware-and-software › linux-and-unix › threads › 328510 › ubuntu-configure-command-not-found
linux kernel - Ubuntu configure: command not found | DaniWeb
(I know cd ./name_folder, ls to see my package and after ./configure, make and make install but I cannot run ./configure.. I did sudo apt-get install build-essential and I saw build-essential is already the newest version. I did sudo aptitude update and sudo aptitude install openssh-client openssh-server but nothing..