bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] split AC_LIB_LINKFLAGS_BODY for multi-library packages


From: Sam Steingold
Subject: [PATCH] split AC_LIB_LINKFLAGS_BODY for multi-library packages
Date: Tue, 11 Mar 2008 17:04:46 -0400
User-agent: Thunderbird 2.0.0.0 (X11/20070326)

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

some packages (e.g., GNU libffcall) install multiple libraries, so
AC_LIB_LINKFLAGS_BODY is insufficient for detecting them.
this patch splits AC_LIB_LINKFLAGS_BODY into two parts: for adding a
- -with-libname-prefix command line switch and for searching for libraries.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH1vPuPp1Qsf2qnMcRAtCPAJ9r/WeIulADigqePSIeQFKHuxmYDgCfUt/D
LRoJkt/WNm7u35bQ3SuRjSM=
=XY/d
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /srv/git/gnulib.git/HEAD/ChangeLog,v
retrieving revision 1.2186
diff -w -p -u ChangeLog
--- ChangeLog revision 1.2186
+++ ChangeLog working copy
@@ -1,3 +1,10 @@
+2007-11-29  Sam Steingold  <address@hidden>
+
+       * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): split into ...
+       (AC_LIB_LINKFLAGS_ADD): adds -with-libname-prefix command line switch
+       (AC_LIB_LINKFLAGS_SEARCH): searches for libname and the libraries
+       corresponding to explicit and implicit dependencies
+
 2007-11-18  Jim Meyering  <address@hidden>
 
        Pull my changes from coreutils:
Index: m4/lib-link.m4
===================================================================
RCS file: /srv/git/gnulib.git/HEAD/m4/lib-link.m4,v
retrieving revision 1.21
diff -w -p -u m4/lib-link.m4
--- m4/lib-link.m4 revision 1.21
+++ m4/lib-link.m4 working copy
@@ -1,4 +1,5 @@
 # lib-link.m4 serial 13 (gettext-0.17)
+dnl -*- Autoconf -*-
 dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -136,13 +137,8 @@
     :, enable_rpath=yes)
 ])
 
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
-dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
+dnl AC_LIB_LINKFLAGS_ADD(name) adds -with-libname-prefix command line switch
+AC_DEFUN([AC_LIB_LINKFLAGS_ADD],[dnl
   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
@@ -171,9 +167,18 @@
         additional_libdir="$withval/$acl_libdirstem"
       fi
     fi
-])
+])])
+
+dnl AC_LIB_LINKFLAGS_SEARCH(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_SEARCH],[dnl
   dnl Search the library and its dependencies in $additional_libdir and
   dnl $LDFLAGS. Using breadth-first-seach.
+  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
   LIB[]NAME=
   LTLIB[]NAME=
   INC[]NAME=
@@ -611,6 +616,16 @@
   fi
 ])
 
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],[
+AC_LIB_LINKFLAGS_ADD($1)dnl
+AC_LIB_LINKFLAGS_SEARCH($1,$2)dnl
+])
+
 dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
 dnl unless already present in VAR.
 dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes

reply via email to

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