libtool
[Top][All Lists]
Advanced

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

Re: Which libtool for autoconf 2.54?


From: Bob Friesenhahn
Subject: Re: Which libtool for autoconf 2.54?
Date: Thu, 10 Oct 2002 16:18:08 -0500 (CDT)

On Thu, 10 Oct 2002, John Gruenenfelder wrote:

> The important line appears to be:
> libtool: link: warning: `AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen \
> support.

This is the libtool macro order that I am successfully using:

# Configure libltdl
AC_LIBLTDL_CONVENIENCE(libltdl)
AC_LIB_LTDL
# Substitute INCLTDL and LIBLTDL in the Makefiles
AC_SUBST(INCLTDL)
AC_SUBST(LIBLTDL)

# Configure libtool
AC_DISABLE_SHARED
AC_ENABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_DLOPEN
AC_LIBTOOL_SETUP
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)

> Another problem I have with the 1.4.2 version of libtool happens if I set the
> CC and CFLAGS environment variables.  If I set those, my configure script will
> correctly use them, but I get errors when the configure script in the libltdl
> directory is run.  They are passed as arguments to libltdl's configure as
> 'CC=foo' 'CFLAGS=foo'.  The configure script interprets these as the host type
> I want to compile for, which is obviously not the correct thing to do.  I get
> around this bug by simply not setting those variables.  Of course, then I
> can't use gcc-3.2.

This means that you should update libltdl's configure to use the same
version of Autoconf and Automake as the rest of your project.  The
failure to pass arguments correctly could certainly lead to a failure.
However, I discovered that it is *much* more efficient to incorporate
libltdl into your own build process and dump libltdl's configure.
Your users will be *much* happier since this avoids watching configure
run a second time.

The entries

AC_LIBLTDL_CONVENIENCE(libltdl)
AC_LIB_LTDL

add everything that your configure script needs to configure libltdl
as part of your project rather than subordinate to your project.

Use the following as your libltdl/Makefile.am:

AUTOMAKE_OPTIONS = 1.6.2 foreign

if INSTALL_LTDL
include_HEADERS = ltdl.h
lib_LTLIBRARIES = libltdl.la
else
noinst_HEADERS = ltdl.h
endif

if CONVENIENCE_LTDL
noinst_LTLIBRARIES = libltdlc.la
endif

EXTRA_DIST = ltdl.h

## Make sure these will be cleaned even when they're not built by
## default.
CLEANFILES = libltdl.la libltdlc.la

libltdl_la_SOURCES = ltdl.c
libltdl_la_LDFLAGS = -no-undefined -version-info 4:0:1
libltdl_la_LIBADD = $(LIBADD_DL)

libltdlc_la_SOURCES = ltdl.c
libltdlc_la_LIBADD = $(LIBADD_DL)

As far as the errors returned from libltdl, I have no idea.  Getting
rid of the "`AC_LIBTOOL_DLOPEN' not used" warning would be the first
step to take.  It sounds like libltdl is mis-configured.

Bob
======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen





reply via email to

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