libtool-patches
[Top][All Lists]
Advanced

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

FYI: put AC_BEFORE decls in the right place [libtool--devo--1.0--patch-2


From: Gary V. Vaughan
Subject: FYI: put AC_BEFORE decls in the right place [libtool--devo--1.0--patch-253]
Date: Fri, 2 Sep 2005 18:42:51 +0100 (BST)
User-agent: mailnotify/0.6

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Applied to HEAD.

  * looking for address@hidden/libtool--devo--1.0--patch-252 to compare with
  * comparing to address@hidden/libtool--devo--1.0--patch-252
  A  tests/.arch-ids/early-libtool.at.id
  A  tests/.arch-ids/link-order.at.id
  A  tests/early-libtool.at
  A  tests/link-order.at
  A  
{arch}/libtool/libtool--gary/libtool--gary--1.0/address@hidden/patch-log/patch-41
  M  libltdl/m4/libtool.m4
  M  ChangeLog
  
  * modified files
  
  Index: Changelog
  from  Gary V. Vaughan  <address@hidden>
  
        AC_BEFORE only works if declarations are made inside the macro
        cited as the first argument:
  
        * libltdl/m4/libtool.m4 (LT_OUTPUT): Move AC_BEFORE decls...
        (LT_INIT, LT_LANG): ...to the macro that has to come first.
  
  --- orig/libltdl/m4/libtool.m4
  +++ mod/libltdl/m4/libtool.m4
  @@ -56,6 +56,8 @@
   AC_DEFUN([LT_INIT],
   [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
   AC_BEFORE([$0], [LT_LANG])dnl
  +AC_BEFORE([$0], [LT_OUTPUT])dnl
  +
   dnl Autoconf doesn't catch unexpanded LT_ macros by default:
   m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
   m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW)$])dnl
  @@ -534,11 +536,7 @@
   # AC_OUTPUT is called), incase it is used in configure for compilation
   # tests.
   AC_DEFUN([LT_OUTPUT],
  -[dnl This macro can only work once all the language testing is completed
  -AC_BEFORE([LT_INIT], [LT_OUTPUT])
  -AC_BEFORE([LT_LANG], [LT_OUTPUT])
  -
  -: ${CONFIG_LT=./config.lt}
  +[: ${CONFIG_LT=./config.lt}
   AC_MSG_NOTICE([creating $CONFIG_LT])
   cat >"$CONFIG_LT" <<_LTEOF
   #! $SHELL
  @@ -748,7 +746,8 @@
   # -------------
   # Enable libtool support for the given language if not already enabled.
   AC_DEFUN([LT_LANG],
  -[m4_case([$1],
  +[AC_BEFORE([$0], [LT_OUTPUT])dnl
  +m4_case([$1],
     [C],                       [_LT_LANG(C)],
     [C++],             [_LT_LANG(CXX)],
     [Java],            [_LT_LANG(GCJ)],
  
  
  
  * added files
  
  --- /dev/null
  +++ 
/Users/gary/devel/savannah/libtool--devo--1.0/,,address@hidden/new-files-archive/./tests/.arch-ids/early-libtool.at.id
  @@ -0,0 +1 @@
  +Gary V. Vaughan <address@hidden> Thu Sep  1 13:11:23 2005 24703.0
  --- /dev/null
  +++ 
/Users/gary/devel/savannah/libtool--devo--1.0/,,address@hidden/new-files-archive/./tests/.arch-ids/link-order.at.id
  @@ -0,0 +1 @@
  +Gary V. Vaughan <address@hidden> Thu Sep  1 13:09:59 2005 24629.0
  --- /dev/null
  +++ 
/Users/gary/devel/savannah/libtool--devo--1.0/,,address@hidden/new-files-archive/./tests/early-libtool.at
  @@ -0,0 +1,215 @@
  +# Hand crafted tests for GNU Libtool.                         -*- Autotest 
-*-
  +# Copyright 2005 Free Software Foundation, Inc.
  +
  +# This program is free software; you can redistribute it and/or modify
  +# it under the terms of the GNU General Public License as published by
  +# the Free Software Foundation; either version 2, or (at your option)
  +# any later version.
  +
  +# This program is distributed in the hope that it will be useful,
  +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  +# GNU General Public License for more details.
  +
  +# You should have received a copy of the GNU General Public License
  +# along with this program; if not, write to the Free Software
  +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  +# 02110-1301, USA.
  +
  +
  +AT_BANNER([libtool script generation.])
  +
  +
  +## --------------------------------------------- ##
  +## Building libtool normally from config.status. ##
  +## --------------------------------------------- ##
  +
  +AT_SETUP([config.status])
  +
  +AT_DATA([configure.ac],
  +[[AC_INIT([libtool-demo], ]]AT_PACKAGE_VERSION[[, ]]AT_PACKAGE_BUGREPORT[[)
  +AC_CONFIG_MACRO_DIR([m4])
  +AM_INIT_AUTOMAKE
  +LT_INIT
  +AC_CONFIG_FILES([Makefile])
  +AC_OUTPUT
  +]])
  +
  +AT_DATA([Makefile.in],
  +[[prefix = @prefix@
  +libdir = @libdir@
  +top_builddir = .
  +DEFAULT_INCLUDES = -I. address@hidden@
  +EXEEXT = @EXEEXT@
  +LIBTOOL = @LIBTOOL@
  +OBJEXT = @OBJEXT@
  +
  +COMPILE = $(CC) $(DEFAULT_INCLUDES)
  +LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFAULT_INCLUDES)
  +LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@
  +
  +all: hell
  +
  +libhello.la: hello.lo
  +     $(LINK) -rpath $(libdir) hello.lo
  +hell$(EXEEXT): main.$(OBJEXT) libhello.la
  +     $(LINK) main.$(OBJEXT) libhello.la
  +
  +.SUFFIXES:
  +.SUFFIXES: .c .$(OBJEXT) .lo
  +
  +.c.$(OBJEXT):
  +     $(COMPILE) -c $<
  +.c.lo:
  +     $(LTCOMPILE) -c -o $@ $<
  +]])
  +
  +AT_DATA([hello.c],
  +[[#include <stdio.h>
  +
  +void
  +hello (void)
  +{
  +  printf ("** This is not GNU Hello.  There is no built-in mail reader. 
**\n");
  +}
  +]])
  +
  +AT_DATA([main.c],
  +[[#include <stdio.h>
  +
  +extern void hello (void);
  +
  +int
  +main (int argc, char *argv[])
  +{
  +  printf ("Welcome to GNU Hell!\n");
  +
  +  hello ();
  +
  +  return 0;
  +}
  +]])
  +
  +AT_DATA(expout,
  +[[Welcome to GNU Hell!
  +** This is not GNU Hello.  There is no built-in mail reader. **
  +]])
  +
  +cat > missing <<_EOF
  +#! /bin/sh
  +exit 0
  +_EOF
  +chmod a+x missing
  +
  +test -f ltmain.sh  || LT_AT_LIBTOOLIZE([--copy --verbose --install])
  +test -f aclocal.m4 || $ACLOCAL -I m4              || exit 1
  +test -f configure  || $AUTOCONF --force           || exit 1
  +test -f Makefile   || ./configure                 || exit 1
  +${MAKE-make}
  +
  +LT_AT_EXEC_CHECK([./hell], [0], [expout])
  +
  +AT_CLEANUP
  +
  +
  +## ------------------------------------------ ##
  +## Building and using libtool from config.lt. ##
  +## ------------------------------------------ ##
  +
  +AT_SETUP([config.lt])
  +
  +AT_DATA([configure.ac],
  +[[AC_INIT([libtool-demo], ]]AT_PACKAGE_VERSION[[, ]]AT_PACKAGE_BUGREPORT[[)
  +AC_CONFIG_MACRO_DIR([m4])
  +AM_INIT_AUTOMAKE
  +LT_INIT
  +LT_OUTPUT
  +
  +cat >hello.c <<\_EOF
  +#include <stdio.h>
  +
  +void
  +hello (void)
  +{
  +  printf ("** This is not GNU Hello.  There is no built-in mail reader. 
**\n");
  +}
  +_EOF
  +
  +# Prove that we can run libtool from inside configure:
  +$SHELL ./libtool --mode=compile --tag=CC "$CC" -I. -I$srcdir \
  +    -c -o hello.lo hello.c  || exit 1
  +$SHELL ./libtool --mode=link --tag=CC "$CC" -o libhello.la \
  +    -rpath /notexist hello.lo || exit 1
  +
  +AC_CONFIG_FILES([Makefile])
  +AC_OUTPUT
  +]])
  +
  +AT_DATA([Makefile.in],
  +[[prefix = @prefix@
  +libdir = @libdir@
  +top_builddir = .
  +DEFAULT_INCLUDES = -I. address@hidden@
  +EXEEXT = @EXEEXT@
  +LIBTOOL = @LIBTOOL@
  +OBJEXT = @OBJEXT@
  +
  +COMPILE = $(CC) $(DEFAULT_INCLUDES)
  +LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@
  +
  +hell$(EXEEXT): main.$(OBJEXT) libhello.la
  +     $(LINK) main.$(OBJEXT) libhello.la
  +
  +.SUFFIXES:
  +.SUFFIXES: .c .$(OBJEXT)
  +
  +.c.$(OBJEXT):
  +     $(COMPILE) -c $<
  +]])
  +
  +AT_DATA([hello.c],
  +[[#include <stdio.h>
  +
  +void
  +hello (void)
  +{
  +  printf ("** This is not GNU Hello.  There is no built-in mail reader. 
**\n");
  +}
  +]])
  +
  +AT_DATA([main.c],
  +[[#include <stdio.h>
  +
  +extern void hello (void);
  +
  +int
  +main (int argc, char *argv[])
  +{
  +  printf ("Welcome to GNU Hell!\n");
  +
  +  hello ();
  +
  +  return 0;
  +}
  +]])
  +
  +AT_DATA(expout,
  +[[Welcome to GNU Hell!
  +** This is not GNU Hello.  There is no built-in mail reader. **
  +]])
  +
  +cat > missing <<_EOF
  +#! /bin/sh
  +exit 0
  +_EOF
  +chmod a+x missing
  +
  +test -f ltmain.sh  || LT_AT_LIBTOOLIZE([--copy --verbose --install])
  +test -f aclocal.m4 || $ACLOCAL -I m4              || exit 1
  +test -f configure  || $AUTOCONF --force           || exit 1
  +test -f Makefile   || ./configure                 || exit 1
  +${MAKE-make}
  +
  +LT_AT_EXEC_CHECK([./hell], [0], [expout])
  +
  +AT_CLEANUP
  --- /dev/null
  +++ 
/Users/gary/devel/savannah/libtool--devo--1.0/,,address@hidden/new-files-archive/./tests/link-order.at
  @@ -0,0 +1,82 @@
  +# Hand crafted tests for GNU Libtool.                         -*- Autotest 
-*-
  +# Copyright 2005 Free Software Foundation, Inc.
  +
  +# This program is free software; you can redistribute it and/or modify
  +# it under the terms of the GNU General Public License as published by
  +# the Free Software Foundation; either version 2, or (at your option)
  +# any later version.
  +
  +# This program is distributed in the hope that it will be useful,
  +# but WITHOUT ANY WARRANTY; without even the implied warranty of
  +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  +# GNU General Public License for more details.
  +
  +# You should have received a copy of the GNU General Public License
  +# along with this program; if not, write to the Free Software
  +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  +# 02110-1301, USA.
  +
  +# link-order.test - make sure that library linking order matches
  +
  +AT_SETUP([Link order test.])
  +eval `$LIBTOOL --config | grep ECHO=`
  +LDFLAGS="$LDFLAGS -no-undefined"
  +
  +prefix_old=`pwd`/old
  +prefix_new=`pwd`/new
  +mkdir src $prefix_old $prefix_new $prefix_old/lib $prefix_new/lib
  +
  +AT_DATA(src/c.c,
  +[[int c = 1;
  +]])
  +
  +$LIBTOOL --mode=compile $CC $CFLAGS -c src/c.c -o src/c.lo
  +$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/libcee.la src/c.lo -rpath 
$prefix_old/lib
  +$LIBTOOL --mode=install cp src/libcee.la $prefix_old/lib/libcee.la
  +
  +for i in old new; do
  +  rm -rf src
  +  mkdir src
  +
  +  cat >src/a_$i.c <<EOF
  +extern int c;
  +extern int b_$i();
  +int a_$i() { return c + b_$i(); }
  +EOF
  +
  +  cat >src/b_$i.c <<EOF
  +extern int c;
  +int b_$i() { return 1 + c; }
  +EOF
  +
  +  prefix=`eval echo \\$prefix_$i`
  +  $LIBTOOL --mode=compile $CC $CFLAGS -c src/a_$i.c -o src/a.lo
  +  $LIBTOOL --mode=compile $CC $CFLAGS -c src/b_$i.c -o src/b.lo
  +  $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/libb.la src/b.lo \
  +      -L$prefix_old/lib -lcee -rpath $prefix/lib
  +  $LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/liba.la src/a.lo \
  +      src/libb.la -L$prefix_old/lib -lcee -rpath $prefix/lib
  +  $LIBTOOL --mode=install cp src/libb.la $prefix/lib/libb.la
  +  AT_CHECK([$LIBTOOL --mode=install cp src/liba.la $prefix/lib/liba.la],
  +     [0], [stdout], [stderr])
  +done
  +
  +# Do not error if we do not relink (e.g. static-only systems)
  +AT_CHECK([if $EGREP relinking stderr; then
  +         $EGREP ' -L.*\/new\/lib -lb -L.*\/old\/lib -lcee' stdout
  +       else :; fi], [0], [ignore], [], [echo "wrong link order"])
  +
  +for i in old new; do
  +  cat >src/main_$i.c <<EOF
  +extern int a_$i();
  +int main(void) { return a_$i() != 3; }
  +EOF
  +
  +  prefix=`eval echo \\$prefix_$i`
  +  $LIBTOOL --mode=compile $CC $CFLAGS -c src/main_$i.c -o src/main_$i.lo
  +  AT_CHECK($LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o src/main_$i 
src/main_$i.lo -L$prefix/lib -la,
  +        [0], [ignore], [ignore])
  +  LT_AT_EXEC_CHECK([src/main_$i])
  +done
  +
  +AT_CLEANUP
  --- /dev/null
  +++ 
/Users/gary/devel/savannah/libtool--devo--1.0/,,address@hidden/new-files-archive/./{arch}/libtool/libtool--gary/libtool--gary--1.0/address@hidden/patch-log/patch-41
  @@ -0,0 +1,15 @@
  +Revision: libtool--gary--1.0--patch-41
  +Archive: address@hidden
  +Creator: Gary V. Vaughan <address@hidden>
  +Date: Fri Sep  2 11:55:58 BST 2005
  +Standard-date: 2005-09-02 10:55:58 GMT
  +Modified-files: ChangeLog libltdl/m4/libtool.m4
  +New-patches: address@hidden/libtool--gary--1.0--patch-41
  +Summary: put AC_BEFORE decls in the right place
  +Keywords: 
  +
  +AC_BEFORE only works if declarations are made inside the macro
  +cited as the first argument:
  +
  +* libltdl/m4/libtool.m4 (LT_OUTPUT): Move AC_BEFORE decls...
  +(LT_INIT, LT_LANG): ...to the macro that has to come first.
  
- -- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
_________________________________________________________
This patch notification generated by tlaapply version 0.9
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFDGI8bFRMICSmD1gYRAm9gAJ0cFQBGADv3J+P0sqrswjQDsnr3qACgx7L5
ChdPMVeagyeG60x7oMa2b2U=
=Lxyq
-----END PGP SIGNATURE-----




reply via email to

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