patchGNU Autoconf Archive - Patches: patch #7403, AX_EXT_HAVE_LIB: macro can be used...

 
 

patch #7403: AX_EXT_HAVE_LIB: macro can be used only once

Submitter:  None
Submitted:  Fri 03 Dec 2010 04:15:41 PM UTC
   
 
Priority:  7 - High Status:  Done
Assigned to:  simons Originator Email:  -email is unavailable-
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 03 Jan 2011 06:32:32 PM UTC, comment #6: 

I have committed your patch in revision 7bc90c7f30048d79f60587a1f831a465f56e8049. Thank you very much.

Peter Simons <simons>
Group administrator
Sun 02 Jan 2011 09:47:57 PM UTC, comment #5: 

"$4" on line 61 is not needed. The only problem that it would be great to fix it's the repetition on libraries, according to example above that happens if neither mysql nor postgresql devel files are installed. In that case LIBS=-lcrypto -lpthread -lresolv  -lcrypto -lpthread -lresolv  -lcrypto -lpthread -lresolv  -lcrypto -lpthread -lresolv

It would be great if LIBS=-lcrypto -lpthread -lresolv

However that problem it seems aesthetic.

(file #22337)

Sergio Belkin <sebelk>
Thu 23 Dec 2010 01:46:58 PM UTC, comment #4: 

Hi Sergio,

I believe that your patch was applied correctly even though the was diff created in reverse order. To make sure, though, could you please check that the current version of
ax_ext_have_lib.m4 in Git is correct?

Take care,
Peter

Peter Simons <simons>
Group administrator
Sat 18 Dec 2010 07:15:50 PM UTC, comment #3: 

Hi Peter,

Thanks for your answer. I've made the mistake of sending the reverse patch. Here is the right patch.

The bug is that if you use the macro twice o more times LIBS variable is equivalent to the last library found.

For example:

AX_EXT_HAVE_LIB([/lib64 /lib /usr/lib64 /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib],resolv,inet_net_pton)

AX_EXT_HAVE_LIB([/lib64 /lib /usr/lib64 /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib],pthread,pthread_create)

AX_EXT_HAVE_LIB([/lib64 /lib /usr/lib64 /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib],crypto,X509_free)

AX_EXT_HAVE_LIB(/lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/local/lib64/ssl /usr/lib/ssl , ssl, SSL_library_init)

AX_EXT_HAVE_LIB(/lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/local/lib64/mysql /usr/lib64/mysql /usr/lib/mysql, mysqlclient, mysql_close, [])

AX_EXT_HAVE_LIB(/lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/local/lib64/postgresql /usr/lib/postgresql , pq, PQfinish)

It ends with:

LIBS=-lpq

The change:
-new_libs="-l$2 ${new_libs}"
+new_libs="-l$2 $4"

It's a workaround when otherwise you get repeated entries of libraries on variable LIBS. That workaround doesn't work if you haven't neither mysql devel nor postgresql devel files in the example above .

Greetings

Sergio Belkin



(file #22227)

Sergio Belkin <sebelk>
Sat 18 Dec 2010 04:43:34 PM UTC, comment #2: 

Hi Sergio,

your patch has been applied in 74225b195efbd0cebc309fdfdc52f6ed41b8e967. Thank you very much. I have added Duncan to Cc so that he has a chance to comment on the modificatin.

Take care,
Peter

Peter Simons <simons>
Group administrator
Fri 03 Dec 2010 04:29:37 PM UTC, comment #1: 

Hi, I've submitted the patch for ax_ext_have_lib.m4, the author of the macro  is Duncan Simpson.

Sergio Belkin <sebelk>
Fri 03 Dec 2010 04:15:41 PM UTC, original submission:  

Macro can be used only once because override the earlier value of "LIBS" variable

You can read more about this issue here:
http://lists.gnu.org/archive/html/autoconf-archive-maintainers/2010-10/msg00024.html

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #22337:  ax_ext_have_lib.m4-20110102.patch added by sebelk (523B - application/octet-stream - "$4" on line 61 is not needed. The only problem that it would be great to fix it's the repetition on libraries, according to example above that happens if neither mysql nor postgresql devel files are installed)
file #22227:  ax_ext_have_lib.m4.patch added by sebelk (450B - text/x-patch)
file #22117:  ax_ext_have_lib.m4.patch added by None (666B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by simons (Posted a comment)
  • -email is unavailable- added by simons (Original author)
  • -email is unavailable- added by sebelk (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    Follow 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-02-02 simons StatusReady For Test Done
        Open/ClosedOpen Closed
    2011-01-03 simons StatusDone Ready For Test
        Open/ClosedClosed Open
    2011-01-02 sebelk Attached File- Added ax_ext_have_lib.m4-20110102.patch, #22337
    2011-01-02 simons StatusReady For Test Done
        Open/ClosedOpen Closed
    2010-12-18 sebelk Attached File- Added ax_ext_have_lib.m4.patch, #22227
    2010-12-18 simons StatusNone Ready For Test
        Assigned toNone simons
        Summarymacro can be used only once AX_EXT_HAVE_LIB: macro can be used only once
        Carbon-Copy- Added duncan simpson <dps@simpson.demon.co.uk>
    2010-12-03 None Attached File- Added ax_ext_have_lib.m4.patch, #22117

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code