How do you “echo” the last configure/make build –options within a source directory?

Incredibly, somehow everyone else missed the canonical way to do this, which has been around since 2 years before this thread began. 🙂 I wondered the same thing as the OP and was disappointed by the lack of proper (non-ugly) ways to do this when I read this thread. A few days later, while idly … Read more

What is the job of autogen.sh when building a c++ package on Linux [duplicate]

The steps: The autogen.sh script generates the configure script (from configure.ac, using autoconf) and any files it needs (like creating Makefile.in from Makefile.am using automake). This requires autotools to be installed on your system, and it must be run when checking out the project from source control (if configure isn’t checked in). People who download … Read more

Any difference between configure.ac and configure.in, and Makefile.am and Makefile.in?

configure.ac and configure.in are two possible names for the master Autoconf source file, which is processed by autoconf to generate the configure shell script. configure.ac is preferred for new packages, configure.in is an older name which still works. (The .in suffix is now recommended to be used only for files which will be processed by … Read more

Autotools: how to cleanup files created by “./configure” in lighttpd project?

I personally would really use the features of a source control software (you should use one) for this. This would cleanup make independent of your build process. See e.g. svn-cleanup or git clean. Nevertheless, automake allows some tweaking when to remove which files. This has (intentionally?) built-in limitations on what files generated by autotools can … Read more

What configure options were used when building gcc / libstdc++?

gcc -v prints out the configuration options among other stuff: $ gcc -v Using built-in specs. Target: i686-pc-cygwin Configured with: /gnu/gcc/releases/packaging/4.3.4-3/gcc4-4.3.4-3/src/gcc-4.3.4/ configure –srcdir=/gnu/gcc/releases/packaging/4.3.4-3/gcc4-4.3.4-3/src/gcc-4.3. 4 –prefix=/usr –exec-prefix=/usr –bindir=/usr/bin –sbindir=/usr/sbin –libex ecdir=/usr/lib –datadir=/usr/share –localstatedir=/var –sysconfdir=/etc –inf odir=/usr/share/info –mandir=/usr/share/man –datadir=/usr/share –infodir=/usr /share/info –mandir=/usr/share/man -v –with-gmp=/usr –with-mpfr=/usr –enable -bootstrap –enable-version-specific-runtime-libs –with-slibdir=/usr/bin –libe xecdir=/usr/lib –enable-static –enable-shared –enable-shared-libgcc –disable -__cxa_atexit –with-gnu-ld … Read more

Append compile flags to CFLAGS and CXXFLAGS while configuration/make

You almost have it right; why did you add the semicolon? To do it on the configure line: ./configure CFLAGS=’-g -O2 -w’ CXXFLAGS=’-g -O2 -w’ To do it on the make line: make CFLAGS=’-g -O2 -w’ CXXFLAGS=’-g -O2 -w’ However, that doesn’t really remove consider all warnings as errors; that removes all warnings. So specifying … Read more

Linux configure/make, –prefix?

Do configure –help and see what other options are available. It is very common to provide different options to override different locations. By standard, –prefix overrides all of them, so you need to override config location after specifying the prefix. This course of actions usually works for every automake-based project. The worse case scenario is … Read more

How to resolve configure guessing build type failure?

search for /usr/share/automake*/config.guess check the latest version of automake $ which automake $ automake –version find the appropriate automake folder in /usr/share/automake.1.11.1/config.guess replace config.guess from your build tree with /usr/share/automake.1.11.1/config.guess (The same may/is usually needed for config.sub.)