bug-autoconf
[Top][All Lists]
Advanced

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

autoscan does not find libraries


From: Nicolas Joly
Subject: autoscan does not find libraries
Date: Wed, 11 Jul 2001 11:10:38 +0200
User-agent: Mutt/1.2.5i

Hi,

I just saw that autoscan (both CVS and 2.50) does not find libraries
under some circumstances.

autoscan does not scan `Makefile' if `Makefile.in' exists; but if used
with automake (by example), libraries can't be found in `Makefile.in'
as they are set by `$LIBS' (`AC_CHECK_LIB' defaults behaviour).

address@hidden [temp/ac]> grep "^LIBS" M*
Makefile:LIBS = -lm 
Makefile.in:LIBS = @LIBS@



Here follow a small example :

address@hidden [temp/ac]> cat configure.in 
AC_INIT
AM_INIT_AUTOMAKE(foo, 0.0)
AC_PROG_CC
AC_CHECK_LIB(m, log)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
address@hidden [temp/ac]> cat Makefile.am 
bin_PROGRAMS = foobar
address@hidden [temp/ac]> cat foobar.c 
#include <math.h>

int main(int argc, char **argv) {
  double d;

  d = log(1);

  return 0; }

address@hidden [temp/ac]> aclocal
address@hidden [temp/ac]> automake -a -c -i
automake: configure.in: installing `./install-sh'
automake: configure.in: installing `./mkinstalldirs'
automake: configure.in: installing `./missing'
automake: Makefile.am: installing `./INSTALL'
automake: Makefile.am: required file `./NEWS' not found
automake: Makefile.am: required file `./README' not found
automake: Makefile.am: installing `./COPYING'
automake: Makefile.am: required file `./AUTHORS' not found
automake: Makefile.am: required file `./ChangeLog' not found
address@hidden [temp/ac]> touch NEWS README AUTHORS ChangeLog
address@hidden [temp/ac]> autoconf

address@hidden [temp/ac]> ./configure 
checking for a BSD compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking for gcc... no
checking for cc... cc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix... 
checking for object suffix... o
checking whether we are using the GNU C compiler... no
checking whether cc accepts -g... yes
checking for log in -lm... yes
configure: creating ./config.status
config.status: creating Makefile
address@hidden [temp/ac]> make
cc -DPACKAGE=\"foo\" -DVERSION=\"0.0\" -DHAVE_LIBM=1  -I. -I.      -g -c 
foobar.c
cc  -g  -o foobar  foobar.o  -lm 

address@hidden [temp/ac]> autoscan
autoscan: warning: missing AC_PROG_AWK wanted by: 
        Makefile.in:167
        Makefile.in:177
autoscan: warning: missing AC_PROG_LN_S wanted by: 
        Makefile.in:235
address@hidden [temp/ac]> grep LIB configure.scan 
address@hidden [temp/ac]> cat configure.scan 
# Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([foobar.c])
AC_CONFIG_HEADER([config.h])

# Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S

# Checks for libraries.

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.

AC_CONFIG_FILES([Makefile])
AC_OUTPUT

-- 
Nicolas Joly

Informatique Scientifique
Institut Pasteur, Paris.



reply via email to

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