[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
libtool 1.4.1 tests
From: |
s_a_white |
Subject: |
libtool 1.4.1 tests |
Date: |
Sun, 9 Sep 2001 18:05:56 +0100 |
Hi,
I've performed the following tests with the following results:
System Mandrake 8.0 (gcc 2.96). Used apt-get to update binutils, libtool,
automake and autoconf. After the update libtool 1.4 was installed with the
following returned from the rpm database:
libbinutils2-2.11.90.0.8-4mdk
binutils-2.11.90.0.8-4mdk
automake-1.4-20.p5.mdk
autoconf-2.13-9mdk
I then obtained libtool 1.4.1 and did:
./bootstrap
./configure --prefix=/usr
make install
My small test used the following:
configure.in ---------------------------------------------------------------
-----
dnl Process this file with autoconf to produce a configure script.
AC_INIT(Makefile.am)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(test,0.0.0)
AC_CANONICAL_HOST
dnl Checks for programs.
AC_PROG_CC
dnl Initialize libtool.
AC_LIBTOOL_WIN32_DLL
CONFIG_LIBTOOL
AC_OUTPUT(
Makefile \
)
main.c ---------------------------------------------------------------------
---
#incude <math.h>
int main (void)
{
(void) log10 (2000.0);
return 0;
}
acinclude.m4 ---------------------------------------------------------------
------
---
AC_DEFUN(CONFIG_LIBTOOL,
[
save_cc=$CC
save_cflags=$CFLAGS
CC=$CXX
CFLAGS=$CXXFLAGS
AM_PROG_LIBTOOL
CC=$save_cc
CFLAGS=$save_cflags
])
----------------------------------------------------------------------------
-------
Now running configure detects the executable extension as none. Performing
a make builds the program but the link fails stating that log10 is an
unresolved symbol. Under 1.3.5 the code built fine, so am I supposed to
hardcoding -lm now?
Now I rename main.c to main.cpp and modify configure.in to:
configure.in ---------------------------------------------------------------
-----
dnl Process this file with autoconf to produce a configure script.
AC_INIT(Makefile.am)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(test,0.0.0)
AC_CANONICAL_HOST
dnl Use C++ for tests.
AC_LANG_CPLUSPLUS
dnl Checks for programs.
AC_PROG_CC
AC_PROG_CXX
dnl Initialize libtool.
AC_LIBTOOL_WIN32_DLL
CONFIG_LIBTOOL
AC_OUTPUT(
Makefile \
)
----------------------------------------------------------------------------
----
I now re-run the configure and it now detects the executable
extension as .C ... ! I now build the code and it compiles fine so the
maths library is already included. I then add:
#include <iostream>
...
cout << "test" << endl;
to main.cpp. The binary built fine. Now I converted the Makefile.am to not
create a binary but instead an installable shared library. The code built
but
doing a ldd on the shared library found no dependency on libstdc++. Also
the la file
did not indicate the need for libstdc++.
I thought 1.4 was integrated with the multi-language branch and that had
better support for c++? As for the extension detecting correctly I first
reported this with libtool 1.3C. libtool 1.3b had no problems and returned
the
extension correctly. I also hoped to update to 1.4 because I've had
problems from some users by using libtool 1.3B and just hardcoding -lstdc++
on the link line.
Simon
- libtool 1.4.1 tests,
s_a_white <=