patchGNU Autoconf Archive - Patches: patch #7490, Allow overriding AX_PATH_GENERIC...

 
 

patch #7490: Allow overriding AX_PATH_GENERIC checks

Submitter:  Vadim Zeitlin <zeitlin>
Submitted:  Sun 06 Mar 2011 05:41:54 PM UTC
 
Priority:  4 Status:  Done
Assigned to:  simons Open/Closed:  Closed
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Thu 17 Mar 2011 08:18:53 PM UTC, comment #1: 

Your patch has been pushed in f6b444dad92ba44b83013eef740a1c96ac8f120f. Thank you very much!

Peter Simons <simons>
Project Administrator
Sun 06 Mar 2011 05:41:54 PM UTC, original submission:  

The attached patch allows to set LIBRARY_LIBS and LIBRARY_CFLAGS variables on configure command line or in the environment to override the normal values returned by `library-config --libs` and `--cflags` respectively.

The patch is a bit difficult to read because of the indentation changes but the real change is quite trivial, here it is (without the changes in the documentation comment):

% git diff -w
diff --git a/m4/ax_path_generic.m4 b/m4/ax_path_generic.m4
index 4db2da1..809855b 100644
--- a/m4/ax_path_generic.m4
+++ b/m4/ax_path_generic.m4
@@ -75,6 +89,13 @@ AC_DEFUN([AX_PATH_GENERIC],[
   AC_ARG_VAR(UP[]_CFLAGS, [CFLAGS used for $1])
   AC_ARG_VAR(UP[]_LIBS,   [LIBS used for $1])

+  AS_IF([test x$UP[]_CFLAGS != x -o x$UP[]_LIBS != x],[
+    dnl Don't run config script at all, use user-provided values instead.
+    AC_SUBST(UP[]_CFLAGS)
+    AC_SUBST(UP[]_LIBS)
+    :
+    $4
+  ],[
   AS_IF([test x$DOWN[]_config_exec_prefix != x],[
     DOWN[]_config_args="$DOWN[]_config_args --exec-prefix=$DOWN[]_config_exec_prefix"
     AS_IF([test x${UP[]_CONFIG+set} != xset],[
@@ -136,6 +157,7 @@ AC_DEFUN([AX_PATH_GENERIC],[
       $4
     ])
   ])
+  ])

   popdef([UP])
   popdef([DOWN])

A typical scenario in which this change could be useful is mentioned in the comment, see also this thread.

Vadim Zeitlin <zeitlin>

 

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

Attach Files:
   
   
Comment:
   

Attached Files

 

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
  • -email is unavailable- added by zeitlin (Submitted the item)
  •  

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-04-01 simons StatusReady For Test Done
        Open/ClosedOpen Closed
    2011-03-17 simons StatusNone Ready For Test
        Assigned toNone simons
        Carbon-Copy- Added francesco salvestrini
    2011-03-06 zeitlin Attached File- Added ax_override_path_generic.diff, #22845

    Back to the top


    Powered by Savane 3.9