autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_PROG_LIBTOOL


From: Adam Dyga
Subject: Re: AC_PROG_LIBTOOL
Date: Fri, 15 Oct 2004 15:25:37 +0000
User-agent: KMail/1.6.2

On Friday 15 October 2004 14:00, Bob Friesenhahn wrote:
> On Fri, 15 Oct 2004, Adam Dyga wrote:
> > I create shared library, so I had to put AC_PROG_LIBTOOL macro call in
> > configure.in.
> > The result is that configure script makes some strange and unnecessary
> > (at least for me ;) ) checks now, e.g:
> >
> > checking for g77... no
> > checking for f77... no
> > checking for xlf... no
> > checking for frt... no
> > checking for pgf77... no
> > [...]
> > checking whether we are using the GNU Fortran 77 compiler... no
> >
> > Why does it check for fortran compiler if I'm using C++ only?
>
> This is a libtool 1.5.X issue.  A resolution will be provided in
> libtool 2.0, which should soon be released.

That's strange because other C++ libraries (I've tested some - libds for 
example) use AC_PROG_LIBTOOL macro call too and configure doesn't make those 
strange checks later.

Here is my configure.in:

AC_INIT(deflatec++, 1.00)
AM_INIT_AUTOMAKE
AC_LANG(C++)
AC_PROG_CXX
AC_PROG_INSTALL
CXXFLAGS="-ansi -pedantic -Wall ${CXXFLAGS}"
AC_PROG_LIBTOOL
AC_OUTPUT(Makefile src/Makefile)

And here is libds's configure.in (a few first lines):

nl Process this file with autoconf to produce a configure script.
AC_INIT(lib/DSNetwork.cpp) dnl a source file from your sub dir
AC_PREFIX_DEFAULT(/usr/local)
AC_CONFIG_HEADER(config.h) dnl at the distribution this done
AC_CHECK_LIB(socket, socket, [LIBSOCKET="-lsocket -lnsl"]) dnl for Solaris
AC_SUBST(LIBSOCKET)
AC_ARG_WITH(warnings,
[  --with-warnings         compile with -pedantic -ansi -Wall],
[if test "$withval" = "yes"; then CXXFLAGS="$CXXFLAGS -ansi -pedantic -Wall"; 
CFLAGS="$CFLAGS -ansi -pedantic -W
all"; fi])
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_HEADER_STDC
[...]

Besides some checks (socket, arg etc) there is almost no difference, but libds 
configure doesn't check for fortran compiler and other unnecessary stuff.

Greets
Adam





reply via email to

[Prev in Thread] Current Thread [Next in Thread]