Main Page   Related Pages  

autoconf, automake, libtool, and MSVC

Autotools (autoconf, automake, libtool) and MSVC were never made to work together, but with cccl you can make them become reluctant friends. If you don't already have Cygwin and cccl installed, click here.

configure.in

In order to use autoconf and MSVC, make sure the following lines are in your configure.in:

AC_CANONICAL_SYSTEM
AC_CYGWIN
AC_OBJEXT
AC_EXEEXT

If your configure.in contains a reference to AM_PROG_LIBTOOL, add the following line before AM_PROG_LIBTOOL

AC_LIBTOOL_WIN32_DLL

Makefile.am

Believe it or not, your Makefile.am's will probably not require any changes to work.

Convenience Libraries

Convenience libraries (noinst *.a targets) work fine without any changes.

Executable Targets

No changes required. However, you may want to create a resource file to add the explorer icon to the .exe file.

Todo:
Add link to page explaining how to do this.

Static Libraries (*.lib)

autotools can build static libraries fine. However, you will probably want the output file to have a different name under Windows (super.lib vs. libsuper.a). You can accomplish this using some automake conditionals.

Dynamic Link Libraries (*.dll)

autotools really doesn't support this very well (at least not in 2.13/1.4/1.3.5). You'll probably just have to write the rules to do this by hand, and select them using an automake conditional.

Building Your Projects

Once you've generated your configure script and Makefiles by running aclocal, autoheader, autoconf, and automake, you're ready to compile.

Before you run the configure script (from with Cygwin, of course), you need to set the compiler environment variables to use cccl.

export CC=cccl
export CXX=cccl

If you have any C++ that uses exceptions (any code that uses the STL uses exceptions), you'll need to set CXXFLAGS properly to:

export CXXFLAGS="/GR /GX"

The /GR and /GX options are unrecognized by cccl and therefore will be passed directly to cl.exe.

Now, cross your fingers, and "./configure" and "make".


Generated on Fri Jan 24 10:15:22 2003 for cccl by doxygen1.2.16